diff options
Diffstat (limited to 'cli/tests/ts_decorators.ts')
-rw-r--r-- | cli/tests/ts_decorators.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cli/tests/ts_decorators.ts b/cli/tests/ts_decorators.ts new file mode 100644 index 000000000..67fd0604f --- /dev/null +++ b/cli/tests/ts_decorators.ts @@ -0,0 +1,14 @@ +/* eslint-disable */ + +function Decorate() { + return function (constructor: any): any { + return class extends constructor { + protected someField: string = "asdf"; + }; + }; +} + +@Decorate() +class SomeClass {} + +console.log(new SomeClass()); |