-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dont load JavaScript if types packages are present
- Loading branch information
Showing
12 changed files
with
71 additions
and
17 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
6 changes: 4 additions & 2 deletions
6
tests/baselines/reference/project/nodeModulesMaxDepthIncreased/amd/maxDepthIncreased/root.js
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,6 +1,8 @@ | ||
define(["require", "exports", "m1"], function (require, exports, m1) { | ||
define(["require", "exports", "m1", "m4"], function (require, exports, m1, m4) { | ||
"use strict"; | ||
m1.f1("test"); | ||
m1.f2.a = 10; | ||
m1.f2.person.age = "10"; // Error: Should be number | ||
m1.f2.person.age = "10"; // Should error if loaded the .js files correctly | ||
var r1 = m4.test.charAt(2); // Should error if correctly not using the .js file but using @types info | ||
var r2 = 3 + m4.foo; // Should be OK if correctly using the @types .d.ts file | ||
}); |
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
5 changes: 4 additions & 1 deletion
5
...s/baselines/reference/project/nodeModulesMaxDepthIncreased/node/maxDepthIncreased/root.js
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,5 +1,8 @@ | ||
"use strict"; | ||
var m1 = require("m1"); | ||
var m4 = require("m4"); | ||
m1.f1("test"); | ||
m1.f2.a = 10; | ||
m1.f2.person.age = "10"; // Error: Should be number | ||
m1.f2.person.age = "10"; // Should error if loaded the .js files correctly | ||
var r1 = m4.test.charAt(2); // Should error if correctly not using the .js file but using @types info | ||
var r2 = 3 + m4.foo; // Should be OK if correctly using the @types .d.ts file |
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
1 change: 1 addition & 0 deletions
1
tests/cases/projects/NodeModulesSearch/maxDepthIncreased/node_modules/@types/m4/entry.d.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
tests/cases/projects/NodeModulesSearch/maxDepthIncreased/node_modules/@types/m4/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
tests/cases/projects/NodeModulesSearch/maxDepthIncreased/node_modules/m4/entry.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
tests/cases/projects/NodeModulesSearch/maxDepthIncreased/node_modules/m4/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 7 additions & 1 deletion
8
tests/cases/projects/NodeModulesSearch/maxDepthIncreased/root.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 |
---|---|---|
@@ -1,4 +1,10 @@ | ||
import * as m1 from "m1"; | ||
import * as m4 from "m4"; | ||
|
||
m1.f1("test"); | ||
m1.f2.a = 10; | ||
m1.f2.person.age = "10"; // Error: Should be number | ||
|
||
m1.f2.person.age = "10"; // Should error if loaded the .js files correctly | ||
let r1 = m4.test.charAt(2); // Should error if correctly not using the .js file but using @types info | ||
|
||
let r2 = 3 + m4.foo; // Should be OK if correctly using the @types .d.ts file |