Make TypedPropertyDescriptor less type strict (#436)

This commit is contained in:
Max Graey 2019-02-02 17:22:22 +02:00 committed by Daniel Wirtz
parent 2131c51932
commit 1867416236

View File

@ -932,28 +932,28 @@ declare function global(
declare function operator(token: string): ( declare function operator(token: string): (
target: any, target: any,
propertyKey: string, propertyKey: string,
descriptor: TypedPropertyDescriptor<Function> descriptor: TypedPropertyDescriptor<any>
) => TypedPropertyDescriptor<Function> | void; ) => TypedPropertyDescriptor<any> | void;
declare namespace operator { declare namespace operator {
/** Annotates a method as a binary operator overload for the specified `token`. */ /** Annotates a method as a binary operator overload for the specified `token`. */
export function binary(token: string): ( export function binary(token: string): (
target: any, target: any,
propertyKey: string, propertyKey: string,
descriptor: TypedPropertyDescriptor<Function> descriptor: TypedPropertyDescriptor<any>
) => TypedPropertyDescriptor<Function> | void; ) => TypedPropertyDescriptor<any> | void;
/** Annotates a method as an unary prefix operator overload for the specified `token`. */ /** Annotates a method as an unary prefix operator overload for the specified `token`. */
export function prefix(token: string): ( export function prefix(token: string): (
target: any, target: any,
propertyKey: string, propertyKey: string,
descriptor: TypedPropertyDescriptor<Function> descriptor: TypedPropertyDescriptor<any>
) => TypedPropertyDescriptor<Function> | void; ) => TypedPropertyDescriptor<any> | void;
/** Annotates a method as an unary postfix operator overload for the specified `token`. */ /** Annotates a method as an unary postfix operator overload for the specified `token`. */
export function postfix(token: string): ( export function postfix(token: string): (
target: any, target: any,
propertyKey: string, propertyKey: string,
descriptor: TypedPropertyDescriptor<Function> descriptor: TypedPropertyDescriptor<any>
) => TypedPropertyDescriptor<Function> | void; ) => TypedPropertyDescriptor<any> | void;
} }
/** Annotates a class as being unmanaged with limited capabilities. */ /** Annotates a class as being unmanaged with limited capabilities. */
@ -966,12 +966,12 @@ declare function sealed(constructor: Function): void;
declare function inline( declare function inline(
target: any, target: any,
propertyKey: string, propertyKey: string,
descriptor: TypedPropertyDescriptor<Function> descriptor: TypedPropertyDescriptor<any>
): TypedPropertyDescriptor<Function> | void; ): TypedPropertyDescriptor<any> | void;
/** Annotates an explicit external name of a function or global. */ /** Annotates an explicit external name of a function or global. */
declare function external(namespace: string, name: string): ( declare function external(namespace: string, name: string): (
target: any, target: any,
propertyKey: string, propertyKey: string,
descriptor: TypedPropertyDescriptor<Function> descriptor: TypedPropertyDescriptor<any>
) => TypedPropertyDescriptor<Function> | void; ) => TypedPropertyDescriptor<any> | void;