Add support for declare export + fixes (#224)
* Add support for declare export * Do not allow declare module inside declare module * Reallow module exports outside module * Add handling of `declare export default` Add check for multiple module.export declarations * Disallow export let/const/type Refactor parsing object properties to share more code and add support for getters and setters * Rename tests * Update test fixtures * Optimize for performance * disallow declare export interface outside of module * Refactor code to be more readable and less lookahead * Add comments * Add test for export star as * Test for number literal getter/setter * Add more tests * Fix tests * Allow union types and correctly eat semi after type * Use non computed keys * Fix tests
This commit is contained in:
1
test/fixtures/flow/declare-module/invalid-module-in-module/actual.js
vendored
Normal file
1
test/fixtures/flow/declare-module/invalid-module-in-module/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module A { declare module B {} }
|
||||
3
test/fixtures/flow/declare-module/invalid-module-in-module/options.json
vendored
Normal file
3
test/fixtures/flow/declare-module/invalid-module-in-module/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "`declare module` cannot be used inside another `declare module` (1:27)"
|
||||
}
|
||||
Reference in New Issue
Block a user