puerts.d.ts 817 B

12345678910111213141516171819202122232425
  1. declare module "puerts" {
  2. import {$Ref, $Task, System} from "csharp"
  3. function $ref<T>(x? : T) : $Ref<T>;
  4. function $unref<T>(x: $Ref<T>) : T;
  5. function $set<T>(x: $Ref<T>, val:T) : void;
  6. function $promise<T>(x: $Task<T>) : Promise<T>;
  7. function $generic<T extends new (...args:any[]) => any> (genericType :T, ...genericArguments: (new (...args:any[]) => any)[]) : T;
  8. function $typeof(x : new (...args:any[]) => any) : System.Type;
  9. function $extension(c : Function, e: Function) : void;
  10. function on(eventType: string, listener: Function, prepend?: boolean) : void;
  11. function off(eventType: string, listener: Function) : void;
  12. function emit(eventType: string, ...args:any[]) : boolean;
  13. }
  14. declare function require(name: string): any;