Add support for flow's SymbolTypeAnnotation (#11077)
This commit is contained in:
@@ -596,6 +596,10 @@ export function QualifiedTypeIdentifier(node: Object) {
|
||||
this.print(node.id, node);
|
||||
}
|
||||
|
||||
export function SymbolTypeAnnotation() {
|
||||
this.word("symbol");
|
||||
}
|
||||
|
||||
function orSeparator() {
|
||||
this.space();
|
||||
this.token("|");
|
||||
|
||||
@@ -23,3 +23,4 @@ declare opaque type Foo<T>: Bar<T>;
|
||||
declare opaque type ID;
|
||||
declare opaque type num: number;
|
||||
declare opaque type NumArray;
|
||||
declare var sym: symbol;
|
||||
|
||||
@@ -41,4 +41,5 @@ declare module.exports: {
|
||||
declare opaque type Foo<T>: Bar<T>;
|
||||
declare opaque type ID;
|
||||
declare opaque type num: number;
|
||||
declare opaque type NumArray;
|
||||
declare opaque type NumArray;
|
||||
declare var sym: symbol;
|
||||
@@ -128,3 +128,4 @@ var a34: {| id<T>(x: T): T; |};
|
||||
function foo27(numVal: number = 2) {}
|
||||
function foo28(numVal?: number = 2) {}
|
||||
export type * from "foo";
|
||||
const foo29: symbol = Symbol();
|
||||
|
||||
@@ -293,4 +293,5 @@ function foo27(numVal: number = 2) {}
|
||||
|
||||
function foo28(numVal?: number = 2) {}
|
||||
|
||||
export type * from "foo";
|
||||
export type * from "foo";
|
||||
const foo29: symbol = Symbol();
|
||||
Reference in New Issue
Block a user