Skip to content

Commit

Permalink
refactor(typings): add support for decorators (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lodin committed Jul 27, 2018
1 parent 2fea723 commit 787dbfd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/typings/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@corpuscule/typings",
"version": "0.2.0",
"version": "0.3.0",
"description": "Common types for Corpuscule",
"types": "lib/index.d.ts",
"author": "Vlad Rindevich <rindevich.vs@gmail.com> (https://github.com/Lodin)",
Expand Down
3 changes: 3 additions & 0 deletions packages/typings/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ export interface CustomElementClass<T> {
}

export type UncertainCustomElementClass<T> = CustomElementClass<T> | Omit<CustomElementClass<T>, "is">;

export type ClassDecorator = <T>(target: UncertainCustomElementClass<T>) => CustomElementClass<T>;
export type FieldDecorator = <T>(target: UncertainCustomElementClass<T>, propertyName: string) => any;

0 comments on commit 787dbfd

Please sign in to comment.