Simplify PrivateName and ClassPrivateProperty types (#532)
* Simplify PrivateName and ClassPrivateProperty types * ClassPrivateProperty is not a ClassMemberBase; can't be static, can't be computed
This commit is contained in:
parent
01da62283c
commit
2541ab5fda
12
src/types.js
12
src/types.js
@ -62,11 +62,9 @@ export type Identifier = PatternBase & {
|
||||
__clone(): Identifier;
|
||||
};
|
||||
|
||||
export type PrivateName = PatternBase & {
|
||||
export type PrivateName = NodeBase & {
|
||||
type: "PrivateName";
|
||||
name: string;
|
||||
|
||||
__clone(): Identifier;
|
||||
};
|
||||
|
||||
// Literals
|
||||
@ -591,16 +589,10 @@ export type ClassProperty = ClassMemberBase & {
|
||||
readonly?: true;
|
||||
};
|
||||
|
||||
export type ClassPrivateProperty = ClassMemberBase & {
|
||||
export type ClassPrivateProperty = NodeBase & {
|
||||
type: "ClassPrivateProperty";
|
||||
key: Identifier;
|
||||
value: ?Expression; // TODO: Not in spec that this is nullable.
|
||||
|
||||
typeAnnotation?: ?FlowTypeAnnotation; // TODO: Not in spec
|
||||
variance?: ?FlowVariance; // TODO: Not in spec
|
||||
|
||||
// TypeScript only: (TODO: Not in spec)
|
||||
readonly?: true;
|
||||
};
|
||||
|
||||
export type OptClassDeclaration = ClassBase & DeclarationBase & HasDecorators & {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user