* fix: typo * declare name for flow interface * add test case for export overload function, typescript * test: add test Fixes #10044 * test: update test * test(flow): add multiple declarations regression test * re-enable flow test case # Conflicts: # packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/def-site-variance/input.js # packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-declare-statements/input.js # packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-interfaces-module-and-script/input.js # packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-iterator/input.js * test: disable two flow dupl-decl test * fix: do not declare name for declare function until we figure out a better way * test: duplicate declare function and function would not throw
253 lines
5.4 KiB
JSON
253 lines
5.4 KiB
JSON
{
|
|
"type": "File",
|
|
"start": 0,
|
|
"end": 82,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 6,
|
|
"column": 1
|
|
}
|
|
},
|
|
"program": {
|
|
"type": "Program",
|
|
"start": 0,
|
|
"end": 82,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 6,
|
|
"column": 1
|
|
}
|
|
},
|
|
"sourceType": "module",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "DeclareClass",
|
|
"start": 0,
|
|
"end": 18,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 18
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start": 14,
|
|
"end": 16,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 14
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 16
|
|
},
|
|
"identifierName": "C1"
|
|
},
|
|
"name": "C1"
|
|
},
|
|
"typeParameters": null,
|
|
"extends": [],
|
|
"implements": [],
|
|
"mixins": [],
|
|
"body": {
|
|
"type": "ObjectTypeAnnotation",
|
|
"start": 16,
|
|
"end": 18,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 16
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 18
|
|
}
|
|
},
|
|
"callProperties": [],
|
|
"properties": [],
|
|
"indexers": [],
|
|
"internalSlots": [],
|
|
"exact": false
|
|
}
|
|
},
|
|
{
|
|
"type": "DeclareClass",
|
|
"start": 19,
|
|
"end": 37,
|
|
"loc": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 18
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start": 33,
|
|
"end": 35,
|
|
"loc": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 14
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 16
|
|
},
|
|
"identifierName": "C1"
|
|
},
|
|
"name": "C1"
|
|
},
|
|
"typeParameters": null,
|
|
"extends": [],
|
|
"implements": [],
|
|
"mixins": [],
|
|
"body": {
|
|
"type": "ObjectTypeAnnotation",
|
|
"start": 35,
|
|
"end": 37,
|
|
"loc": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 16
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 18
|
|
}
|
|
},
|
|
"callProperties": [],
|
|
"properties": [],
|
|
"indexers": [],
|
|
"internalSlots": [],
|
|
"exact": false
|
|
}
|
|
},
|
|
{
|
|
"type": "DeclareModule",
|
|
"start": 39,
|
|
"end": 82,
|
|
"loc": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 6,
|
|
"column": 1
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start": 54,
|
|
"end": 56,
|
|
"loc": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 15
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 17
|
|
},
|
|
"identifierName": "M1"
|
|
},
|
|
"name": "M1"
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start": 57,
|
|
"end": 82,
|
|
"loc": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 18
|
|
},
|
|
"end": {
|
|
"line": 6,
|
|
"column": 1
|
|
}
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "DeclareClass",
|
|
"start": 61,
|
|
"end": 80,
|
|
"loc": {
|
|
"start": {
|
|
"line": 5,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 21
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start": 75,
|
|
"end": 77,
|
|
"loc": {
|
|
"start": {
|
|
"line": 5,
|
|
"column": 16
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 18
|
|
},
|
|
"identifierName": "C1"
|
|
},
|
|
"name": "C1"
|
|
},
|
|
"typeParameters": null,
|
|
"extends": [],
|
|
"implements": [],
|
|
"mixins": [],
|
|
"body": {
|
|
"type": "ObjectTypeAnnotation",
|
|
"start": 78,
|
|
"end": 80,
|
|
"loc": {
|
|
"start": {
|
|
"line": 5,
|
|
"column": 19
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 21
|
|
}
|
|
},
|
|
"callProperties": [],
|
|
"properties": [],
|
|
"indexers": [],
|
|
"internalSlots": [],
|
|
"exact": false
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"kind": "CommonJS"
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
} |