Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Simplify PrivateName and ClassPrivateProperty types #532

Merged
merged 2 commits into from May 22, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -595,12 +593,6 @@ export type ClassPrivateProperty = ClassMemberBase & {
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 & {
Expand Down