/
ClassPropertyBase.ts
35 lines (32 loc) · 1004 Bytes
/
ClassPropertyBase.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import type { Decorator } from '../special/Decorator/spec';
import type { TSTypeAnnotation } from '../special/TSTypeAnnotation/spec';
import type { Expression } from '../unions/Expression';
import type {
PropertyName,
PropertyNameComputed,
PropertyNameNonComputed,
} from '../unions/PropertyName';
import type { Accessibility } from './Accessibility';
import type { BaseNode } from './BaseNode';
interface ClassPropertyBase extends BaseNode {
key: PropertyName;
value: Expression | null;
computed: boolean;
static: boolean;
declare: boolean;
readonly?: boolean;
decorators?: Decorator[];
accessibility?: Accessibility;
optional?: boolean;
definite?: boolean;
typeAnnotation?: TSTypeAnnotation;
override?: boolean;
}
export interface ClassPropertyComputedNameBase extends ClassPropertyBase {
key: PropertyNameComputed;
computed: true;
}
export interface ClassPropertyNonComputedNameBase extends ClassPropertyBase {
key: PropertyNameNonComputed;
computed: false;
}