Debian Codegraph @

packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-decorators/2018-12-ignore-abstract-methods/exec.ts

raw
1 function decorate(value: boolean) {
2 return function(
3 target: any,
4 propertyKey: string,
5 descriptor: PropertyDescriptor
6 ) {};
7 }
8
9 abstract class A {
10 @decorate(false)
11 private decoratedMember: boolean;
12
13 abstract myMethod(): number;
14 }
15
16 class B extends A {
17 constructor() {
18 super();
19 }
20
21 myMethod(): number {
22 return 5;
23 }
24 }
25
26 const b = new B();
27 expect(b.myMethod()).toBe(5);