forked from bazel-contrib/rules_nodejs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(typescript): fix issue with types[] in non-sandboxed tsc
To make worker mode work with TypeScript ambient type discovery, always zero out the compilerOptions#types in the generated tsconfig - users should provide these as deps[] instead. Fixes bazelbuild/rules_typescript#449
- Loading branch information
Showing
7 changed files
with
58 additions
and
8 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,6 @@ | ||
// Cecking that `describe` is a valid symbol here to ensure | ||
// that @types/jasmine is getting picked up | ||
describe('', () => {}); | ||
// Since "hammerjs" is not included in the types=[] array in | ||
// tsconfig, this should result in a compile error: TS2304: Cannot find name 'Hammer' | ||
console.log(typeof Hammer); |
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,15 @@ | ||
# Generated file from yarn_install/npm_install rule. | ||
# See $(bazel info output_base)/external/build_bazel_rules_nodejs/internal/npm_install/generate_build_file.js | ||
|
||
# All rules in other repositories can use these targets | ||
package(default_visibility = ["//visibility:public"]) | ||
|
||
load("@build_bazel_rules_nodejs//internal/npm_install:node_module_library.bzl", "node_module_library") | ||
|
||
# The node_modules directory in one catch-all node_module_library. | ||
# NB: Using this target may have bad performance implications if | ||
# there are many files in target. | ||
# See https://github.com/bazelbuild/bazel/issues/5153. | ||
node_module_library( | ||
name = "node_modules", | ||
) |
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