Add allowPrimitiveOverride option to flowParseTypeAnnotatableIdentifier

This commit is contained in:
Brian Ng
2017-08-29 14:11:50 -05:00
parent 3f1dbecd2e
commit 55f38933bf
3 changed files with 106 additions and 3 deletions

View File

@@ -0,0 +1 @@
declare var string: any;

View File

@@ -0,0 +1,96 @@
{
"type": "File",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"program": {
"type": "Program",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"sourceType": "module",
"body": [
{
"type": "DeclareVariable",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"id": {
"type": "Identifier",
"start": 12,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 23
},
"identifierName": "string"
},
"name": "string",
"typeAnnotation": {
"type": "TypeAnnotation",
"start": 18,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 23
}
},
"typeAnnotation": {
"type": "AnyTypeAnnotation",
"start": 20,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 20
},
"end": {
"line": 1,
"column": 23
}
}
}
}
}
}
],
"directives": []
}
}