a new start
This commit is contained in:
21
packages/hydecorp/component/typings/Decorators.d.ts
vendored
Normal file
21
packages/hydecorp/component/typings/Decorators.d.ts
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
type Constructor<T> = {
|
||||
new (...args: unknown[]): T;
|
||||
};
|
||||
|
||||
// From the TC39 Decorators proposal
|
||||
interface ClassDescriptor {
|
||||
kind: "class";
|
||||
elements: ClassElement[];
|
||||
finisher?: <T>(clazz: Constructor<T>) => undefined | Constructor<T>;
|
||||
}
|
||||
|
||||
// From the TC39 Decorators proposal
|
||||
interface ClassElement {
|
||||
kind: "field" | "method";
|
||||
key: PropertyKey;
|
||||
placement: "static" | "prototype" | "own";
|
||||
initializer?: Function;
|
||||
extras?: ClassElement[];
|
||||
finisher?: <T>(clazz: Constructor<T>) => undefined | Constructor<T>;
|
||||
descriptor?: PropertyDescriptor;
|
||||
}
|
||||
Reference in New Issue
Block a user