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

23 lines
1.1 KiB
TypeScript
Raw Permalink Normal View History

2021-11-05 11:59:54 +08:00
declare module NativeClient {
2021-11-05 15:14:32 +08:00
function log(message: string): void;
function returnNative(ret: string): void;
2021-11-05 11:59:54 +08:00
function callNative(name: string, args: string): string;
function fetchArrayBuffer(id: string): string;
2021-11-05 11:59:54 +08:00
}
type RawValue = number | string | boolean | object | undefined | ArrayBuffer;
type WrappedValue = {
type: "number" | "string" | "boolean" | "object" | "array" | "null" | "arrayBuffer";
2021-11-05 11:59:54 +08:00
value: RawValue;
};
declare function _arrayBufferToBase64(arrayBuffer: ArrayBuffer): string;
declare function _base64ToArrayBuffer(v: string): ArrayBufferLike;
2021-11-05 11:59:54 +08:00
declare function _wrappedValue(v: RawValue): WrappedValue;
2022-03-09 17:35:13 +08:00
declare const cachedArrayBuffer: Map<string, ArrayBuffer>;
declare let bufferId: number;
declare function traverse(obj: object): void;
2021-11-05 11:59:54 +08:00
declare function _rawValue(v: WrappedValue): RawValue;
declare function __injectGlobalObject(name: string, args: string): void;
2021-11-05 11:59:54 +08:00
declare function __injectGlobalFunction(name: string): void;
2021-11-05 15:14:32 +08:00
declare function __invokeMethod(objectName: string, functionName: string, stringifiedArgs: string): void;
declare function _prepared(): void;