@@ -912,28 +912,66 @@ declare function trace(msg: string, n?: i32, a0?: f64, a1?: f64, a2?: f64, a3?:
912
912
913
913
// Decorators
914
914
915
+ interface TypedPropertyDescriptor < T > {
916
+ configurable ?: boolean ;
917
+ enumerable ?: boolean ;
918
+ writable ?: boolean ;
919
+ value ?: T ;
920
+ get ?( ) : T ;
921
+ set ?( value : T ) : void ;
922
+ }
923
+
915
924
/** Annotates an element as a program global. */
916
- declare function global ( target : Function , propertyKey : string , descriptor : any ) : void ;
925
+ declare function global (
926
+ target : any ,
927
+ propertyKey : string ,
928
+ descriptor : TypedPropertyDescriptor < any >
929
+ ) : TypedPropertyDescriptor < any > | void ;
917
930
918
931
/** Annotates a method as a binary operator overload for the specified `token`. */
919
- declare function operator ( token : string ) : ( target : any , propertyKey : string , descriptor : any ) => void ;
932
+ declare function operator ( token : string ) : (
933
+ target : any ,
934
+ propertyKey : string ,
935
+ descriptor : TypedPropertyDescriptor < Function >
936
+ ) => TypedPropertyDescriptor < Function > | void ;
937
+
920
938
declare namespace operator {
921
939
/** Annotates a method as a binary operator overload for the specified `token`. */
922
- export function binary ( token : string ) : ( target : any , propertyKey : string , descriptor : any ) => void ;
940
+ export function binary ( token : string ) : (
941
+ target : any ,
942
+ propertyKey : string ,
943
+ descriptor : TypedPropertyDescriptor < Function >
944
+ ) => TypedPropertyDescriptor < Function > | void ;
923
945
/** Annotates a method as an unary prefix operator overload for the specified `token`. */
924
- export function prefix ( token : string ) : ( target : any , propertyKey : string , descriptor : any ) => void ;
946
+ export function prefix ( token : string ) : (
947
+ target : any ,
948
+ propertyKey : string ,
949
+ descriptor : TypedPropertyDescriptor < Function >
950
+ ) => TypedPropertyDescriptor < Function > | void ;
925
951
/** Annotates a method as an unary postfix operator overload for the specified `token`. */
926
- export function postfix ( token : string ) : ( target : any , propertyKey : string , descriptor : any ) => void ;
952
+ export function postfix ( token : string ) : (
953
+ target : any ,
954
+ propertyKey : string ,
955
+ descriptor : TypedPropertyDescriptor < Function >
956
+ ) => TypedPropertyDescriptor < Function > | void ;
927
957
}
928
958
929
959
/** Annotates a class as being unmanaged with limited capabilities. */
930
- declare function unmanaged ( target : Function ) : any ;
960
+ declare function unmanaged ( constructor : Function ) : void ;
931
961
932
962
/** Annotates a class as being sealed / non-derivable. */
933
- declare function sealed ( target : Function ) : any ;
963
+ declare function sealed ( constructor : Function ) : void ;
934
964
935
965
/** Annotates a method or function as always inlined. */
936
- declare function inline ( target : any , propertyKey : any , descriptor : any ) : any ;
966
+ declare function inline (
967
+ target : any ,
968
+ propertyKey : string ,
969
+ descriptor : TypedPropertyDescriptor < Function >
970
+ ) : TypedPropertyDescriptor < Function > | void ;
937
971
938
972
/** Annotates an explicit external name of a function or global. */
939
- declare function external ( target : any , propertyKey : any , descriptor : any ) : any ;
973
+ declare function external ( namespace : string , name : string ) : (
974
+ target : any ,
975
+ propertyKey : string ,
976
+ descriptor : TypedPropertyDescriptor < Function >
977
+ ) => TypedPropertyDescriptor < Function > | void ;
0 commit comments