/* * Tencent is pleased to support the open source community by making Puerts available. * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. * Puerts is licensed under the BSD 3-Clause License, except for the third-party components listed in the file 'LICENSE' which may be subject to their corresponding license terms. * This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. */ declare module "puerts" { import {Object, Class, $Delegate} from "ue" interface $Ref { __doNoAccess: T } interface $InRef { __doNoAccess: T } type $Nullable = T | null; type cstring = string | ArrayBuffer; function toCString(str:string) : ArrayBuffer; function toCPtrArray(...ab:ArrayBuffer[]) : ArrayBuffer; function $ref(x? : T) : $Ref; function $unref(x: $Ref | $InRef) : T; function $set(x: $Ref | $InRef, val:T) : void; const argv : { getByIndex(index: number): Object; getByName(name: string): Object; } function merge(des: {}, src: {}): void; //function requestJitModuleMethod(moduleName: string, methodName: string, callback: (err: Error, result: any)=> void, ... args: any[]): void; /** * @deprecated please use mixin instead! */ function makeUClass(ctor: { new(): Object }): Class; function blueprint(path:string): T; namespace blueprint { type MixinConfig = { objectTakeByNative?:boolean, inherit?:boolean, generatedClass?: Class, noMixinedWarning?:boolean}; function tojs(cls:Class): T; function mixin>(to:T, mixinMethods:new (...args: any) => R, config?: MixinConfig) : { new (Outer?: Object, Name?: string, ObjectFlags?: number) : R; StaticClass(): Class; }; function unmixin(to:T): void function load(cls: any): void function unload(cls: any): void } function on(eventType: string, listener: Function, prepend?: boolean) : void; function off(eventType: string, listener: Function) : void; function emit(eventType: string, ...args:any[]) : boolean; function toManualReleaseDelegate any>(func: T): $Delegate; function releaseManualReleaseDelegate any>(func: T): void; function toDelegate(obj: T, key: T[K] extends (...args: any) => any ? K : never) : $Delegate any ? T[K] : never>; function toDelegate any>(owner: Object, callback: T): $Delegate; function load(dllpath): T; /*function getProperties(obj: Object, ...propNames:string[]): any; function getPropertiesAsync(obj: Object, ...propNames:string[]): Promise; function setProperties(obj: Object, properties: any):void; function setPropertiesAsync(obj: Object, properties: any):Promise; function flushAsyncCall(trace?:boolean):number; type AsyncFunction any> = (...a: ArgumentTypes) => Promise extends Object ? AsyncObject> : ReturnType>; type AsyncObject = { [P in keyof T] : T[P] extends (...args: any) => any ? AsyncFunction : T[P]; } & T function $async(x: T) : AsyncObject;*/ function setJsTakeRef(object : Object) : void; }