mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00

* Add `releaseNativeObject` function in `utils` * Add tests * Add typings for the global `__releaseNativeCounterpart` functions provided by Android and iOS runtimes refs https://github.com/NativeScript/ios-runtime/issues/1062 and https://github.com/NativeScript/android-runtime/issues/1254
24 lines
647 B
TypeScript
24 lines
647 B
TypeScript
/* tslint:disable:no-unused-variable */
|
|
// Android specific TypeScript declarations
|
|
declare function float(num: number): any;
|
|
declare function long(num: number): any;
|
|
|
|
/**
|
|
* Triggers garbage collection in JavaScript
|
|
*/
|
|
declare var gc: () => void;
|
|
|
|
/**
|
|
* Releases the reference to the wrapped native object
|
|
* @param object The Java object to release.
|
|
*/
|
|
declare function __releaseNativeCounterpart(object: java.lang.Object): void;
|
|
|
|
interface ArrayConstructor {
|
|
create(type: any, count: number): any;
|
|
}
|
|
|
|
declare module native { export class Array<T> { constructor(); length: number; [index: number]: T; } }
|
|
|
|
import globalAndroid = android;
|