puerts.d.ts 864 B

1234567891011121314151617181920212223242526
  1. declare module "puerts" {
  2. import CSharp from "csharp";
  3. function $ref<T>(x? : T) : CSharp.$Ref<T>;
  4. function $unref<T>(x: CSharp.$Ref<T>) : T;
  5. function $set<T>(x: CSharp.$Ref<T>, val:T) : void;
  6. function $promise<T>(x: CSharp.$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) : CSharp.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;