This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-js/lib/index.web.d.ts
2022-03-09 18:14:06 +08:00

23 lines
1.1 KiB
TypeScript

declare module NativeClient {
function log(message: string): void;
function returnNative(ret: string): void;
function callNative(name: string, args: string): string;
function fetchArrayBuffer(id: string): string;
}
declare type RawValue = number | string | boolean | object | undefined | ArrayBuffer;
declare type WrappedValue = {
type: "number" | "string" | "boolean" | "object" | "array" | "null" | "arrayBuffer";
value: RawValue;
};
declare function _arrayBufferToBase64(arrayBuffer: ArrayBuffer): string;
declare function _base64ToArrayBuffer(v: string): ArrayBufferLike;
declare function _wrappedValue(v: RawValue): WrappedValue;
declare const cachedArrayBuffer: Map<string, ArrayBuffer>;
declare let bufferId: number;
declare function traverse(obj: object): void;
declare function _rawValue(v: WrappedValue): RawValue;
declare function __injectGlobalObject(name: string, args: string): void;
declare function __injectGlobalFunction(name: string): void;
declare function __invokeMethod(objectName: string, functionName: string, stringifiedArgs: string): void;
declare function _prepared(): void;