core/lib/tern_from_ts/defs/emscripten.json.tmp
2017-05-14 13:22:31 +02:00

136 lines
5.7 KiB
Plaintext

{
"Emscripten": {
"FileSystemType": {}
},
"Module": {
"print": "fn(str: string)",
"printErr": "fn(str: string)",
"arguments": "[string]",
"preInit": "[]",
"preRun": "[1]",
"postRun": "[2]",
"noExitRuntime": "bool",
"Runtime": "?",
"ccall": "fn(ident: string, returnType: string, argTypes: [string], args: [?]) -> ?",
"cwrap": "fn(ident: string, returnType: string, argTypes: [string]) -> ?",
"setValue": "fn(ptr: number, value: ?, type: string, noSafe?: bool)",
"getValue": "fn(ptr: number, type: string, noSafe?: bool) -> number",
"ALLOC_NORMAL": "number",
"ALLOC_STACK": "number",
"ALLOC_STATIC": "number",
"ALLOC_DYNAMIC": "number",
"ALLOC_NONE": "number",
"allocate": "fn(slab: ?, types: string, allocator: number, ptr: number) -> number",
"Pointer_stringify": "fn(ptr: number, length?: number) -> string",
"UTF16ToString": "fn(ptr: number) -> string",
"stringToUTF16": "fn(str: string, outPtr: number)",
"UTF32ToString": "fn(ptr: number) -> string",
"stringToUTF32": "fn(str: string, outPtr: number)",
"HEAP": "Int32Array",
"IHEAP": "Int32Array",
"FHEAP": "Float64Array",
"HEAP8": "Int8Array",
"HEAP16": "Int16Array",
"HEAP32": "Int32Array",
"HEAPU8": "Uint8Array",
"HEAPU16": "Uint16Array",
"HEAPU32": "Uint32Array",
"HEAPF32": "Float32Array",
"HEAPF64": "Float64Array",
"TOTAL_STACK": "number",
"TOTAL_MEMORY": "number",
"FAST_MEMORY": "number",
"addOnPreRun": "fn(cb: fn())",
"addOnInit": "fn(cb: fn())",
"addOnPreMain": "fn(cb: fn())",
"addOnExit": "fn(cb: fn())",
"addOnPostRun": "fn(cb: fn())",
"intArrayFromString": "fn(stringy: string, dontAddNull?: bool, length?: number) -> [number]",
"intArrayToString": "fn(array: [number]) -> string",
"writeStringToMemory": "fn(str: string, buffer: number, dontAddNull: bool)",
"writeArrayToMemory": "fn(array: [number], buffer: number)",
"writeAsciiToMemory": "fn(str: string, buffer: number, dontAddNull: bool)",
"addRunDependency": "fn(id: ?)",
"removeRunDependency": "fn(id: ?)",
"preloadedImages": "?",
"preloadedAudios": "?",
"_malloc": "fn(size: number) -> number",
"_free": "fn(ptr: number)"
},
"FS": {
"Lookup": {
"path": "string",
"node": "FSNode"
},
"FSStream": {},
"FSNode": {},
"ErrnoError": {},
"ignorePermissions": "bool",
"trackingDelegate": "?",
"tracking": "?",
"genericErrors": "?",
"lookupPath": "fn(path: string, opts: ?) -> Lookup",
"getPath": "fn(node: FSNode) -> string",
"isFile": "fn(mode: number) -> bool",
"isDir": "fn(mode: number) -> bool",
"isLink": "fn(mode: number) -> bool",
"isChrdev": "fn(mode: number) -> bool",
"isBlkdev": "fn(mode: number) -> bool",
"isFIFO": "fn(mode: number) -> bool",
"isSocket": "fn(mode: number) -> bool",
"major": "fn(dev: number) -> number",
"minor": "fn(dev: number) -> number",
"makedev": "fn(ma: number, mi: number) -> number",
"registerDevice": "fn(dev: number, ops: ?)",
"syncfs": "fn(populate: bool, callback: fn(e: ?))",
"mount": "fn(type: Emscripten.FileSystemType, opts: ?, mountpoint: string) -> ?",
"unmount": "fn(mountpoint: string)",
"mkdir": "fn(path: string, mode?: number) -> ?",
"mkdev": "fn(path: string, mode?: number, dev?: number) -> ?",
"symlink": "fn(oldpath: string, newpath: string) -> ?",
"rename": "fn(old_path: string, new_path: string)",
"rmdir": "fn(path: string)",
"readdir": "fn(path: string) -> ?",
"unlink": "fn(path: string)",
"readlink": "fn(path: string) -> string",
"stat": "fn(path: string, dontFollow?: bool) -> ?",
"lstat": "fn(path: string) -> ?",
"chmod": "fn(path: string, mode: number, dontFollow?: bool)",
"lchmod": "fn(path: string, mode: number)",
"fchmod": "fn(fd: number, mode: number)",
"chown": "fn(path: string, uid: number, gid: number, dontFollow?: bool)",
"lchown": "fn(path: string, uid: number, gid: number)",
"fchown": "fn(fd: number, uid: number, gid: number)",
"truncate": "fn(path: string, len: number)",
"ftruncate": "fn(fd: number, len: number)",
"utime": "fn(path: string, atime: number, mtime: number)",
"open": "fn(path: string, flags: string, mode?: number, fd_start?: number, fd_end?: number) -> FSStream",
"close": "fn(stream: FSStream)",
"llseek": "fn(stream: FSStream, offset: number, whence: number) -> ?",
"read": "fn(stream: FSStream, buffer: ArrayBufferView, offset: number, length: number, position?: number) -> number",
"write": "fn(stream: FSStream, buffer: ArrayBufferView, offset: number, length: number, position?: number, canOwn?: bool) -> number",
"allocate": "fn(stream: FSStream, offset: number, length: number)",
"mmap": "fn(stream: FSStream, buffer: ArrayBufferView, offset: number, length: number, position: number, prot: number, flags: number) -> ?",
"ioctl": "fn(stream: FSStream, cmd: ?, arg: ?) -> ?",
"readFile": "fn(path: string, opts?: ?) -> ?",
"writeFile": "fn(path: string, data: ArrayBufferView, opts?: ?)",
"cwd": "fn() -> string",
"chdir": "fn(path: string)",
"init": "fn(input: fn(), output: fn(c: number), error: fn(c: number))",
"createLazyFile": "fn(parent: string, name: string, url: string, canRead: bool, canWrite: bool) -> FSNode",
"createPreloadedFile": "fn(parent: string, name: string, url: string, canRead: bool, canWrite: bool, onload?: fn(), onerror?: fn(), dontCreateFile?: bool, canOwn?: bool)"
},
"MEMFS": "Emscripten.FileSystemType",
"NODEFS": "Emscripten.FileSystemType",
"IDBFS": "Emscripten.FileSystemType",
"Math": {
"imul": "fn(a: number, b: number) -> number"
},
"!name": "emscripten.d.ts",
"!define": {
"1": {},
"2": {},
"": {}
}
}