You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes a ts_project might depend on a target which has both .ts source files and .d.ts compiled outputs in it (there are a variety of use cases for this but the most common is that you want to have your javascript bundler be able to run without invoking the typescript type checker. The bundler will depend on the .ts source files only and not the compiled .d.ts files).
For example:
srcs = ["index.tx"]
ts_project(
name = "tsc"
srcs = srcs
)
# source files required for the bundler (css and image files)
bundling_srcs = ["index.css"]
js_library(
srcs = srcs + bundling_srcs,
# Depend on tsc compiler output so that downstream ts_project's can pick up .d.ts files
deps = [":tsc"]
)
In these cases, the .d.ts files should be included in the sandbox and the .ts files should be excluded from the sandbox. Including the .ts sources breaks the semantics or typescript projects since all source files need to be contained under the root directory of the typescript compilation. .ts files from transitive deps will not be under the correct root directory. Furthermore, we do not want to re-compile these sources since they've already been compiled.
The text was updated successfully, but these errors were encountered:
I think microsoft/TypeScript#22208 is the actual issue here, there's no way for us to properly invoke tsc. It's labelled committed so maybe we could fix it?
Sometimes a
ts_project
might depend on a target which has both.ts
source files and.d.ts
compiled outputs in it (there are a variety of use cases for this but the most common is that you want to have your javascript bundler be able to run without invoking the typescript type checker. The bundler will depend on the .ts source files only and not the compiled .d.ts files).For example:
In these cases, the
.d.ts
files should be included in the sandbox and the.ts
files should be excluded from the sandbox. Including the.ts
sources breaks the semantics or typescript projects since all source files need to be contained under the root directory of the typescript compilation..ts
files from transitive deps will not be under the correct root directory. Furthermore, we do not want to re-compile these sources since they've already been compiled.The text was updated successfully, but these errors were encountered: