-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flow] Scoped libdef support 5/n: Error on libdef module override
Summary: Same as last diffs, but for modules. Changelog: [errors] Overriding already defined modules in library definition will now error. Reviewed By: panagosg7 Differential Revision: D70575060 fbshipit-source-id: 72edd21a089e2b30319cc3c28103b6239f9288dc
- Loading branch information
1 parent
10e2d16
commit ff3e286
Showing
5 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
// The lib file is included twice, because it is included in both `lib` and | ||
// `lib/shared`, which are both listed in the `.flowconfig` | ||
declare var global_foo: number; // intentional-libdef-override | ||
|
||
declare module 'bar' { | ||
declare module.exports: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
(global_foo: string); // error: number ~> string | ||
(require('bar'): number); // error: string ~> number |