-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
/
PropertyDefinitionBase.ts
44 lines (40 loc) · 1.19 KB
/
PropertyDefinitionBase.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
36
37
38
39
40
41
42
43
44
import type { Decorator } from '../special/Decorator/spec';
import type { TSTypeAnnotation } from '../special/TSTypeAnnotation/spec';
import type { Expression } from '../unions/Expression';
import type {
ClassPropertyNameNonComputed,
PropertyName,
PropertyNameComputed,
PropertyNameNonComputed,
} from '../unions/PropertyName';
import type { Accessibility } from './Accessibility';
import type { BaseNode } from './BaseNode';
interface PropertyDefinitionBase 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 PropertyDefinitionComputedNameBase
extends PropertyDefinitionBase {
key: PropertyNameComputed;
computed: true;
}
export interface PropertyDefinitionNonComputedNameBase
extends PropertyDefinitionBase {
key: PropertyNameNonComputed;
computed: false;
}
export interface ClassPropertyDefinitionNonComputedNameBase
extends PropertyDefinitionBase {
key: ClassPropertyNameNonComputed;
computed: false;
}