-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Component commits: fce282b Add failing test. ea2c290 Update failing test. d954948 Finalized failing test case. f476e84 Separate our usages of utilities that expect variables initialized to require(...) and require(...).foo. 9f0810c Renamed types and utilities, removed accidental indentation. bf708bf Renamed both utilitiy functions uniformly. Co-authored-by: Daniel Rosenwasser <drosen@microsoft.com>
- Loading branch information
1 parent
8a8048f
commit 8450901
Showing
9 changed files
with
49 additions
and
15 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
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
21 changes: 21 additions & 0 deletions
21
tests/cases/fourslash/importFixesWithExistingDottedRequire.ts
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/// <reference path="./fourslash.ts" /> | ||
|
||
// @module: commonjs | ||
// @checkJs: true | ||
|
||
// @Filename: ./library.js | ||
//// module.exports.aaa = function() {} | ||
//// module.exports.bbb = function() {} | ||
|
||
// @Filename: ./foo.js | ||
//// var aaa = require("./library.js").aaa; | ||
//// aaa(); | ||
//// /*$*/bbb | ||
|
||
goTo.marker("$") | ||
verify.codeFixAvailable([ | ||
{ description: "Import 'bbb' from module \"./library.js\"" }, | ||
{ description: "Ignore this error message" }, | ||
{ description: "Disable checking for this file" }, | ||
{ description: "Convert to ES module" }, | ||
]); |