summaryrefslogtreecommitdiff
path: root/cli/tests/ts_decorators.ts
blob: 95fba6cd48b2244597b16f7fbcef2091d03a70fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// deno-lint-ignore-file

function Decorate() {
  return function (constructor: any): any {
    return class extends constructor {
      protected someField: string = "asdf";
    };
  };
}

@Decorate()
class SomeClass {}

console.log(new SomeClass());