Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ Then build it:
`bazel build //path/to/package:target`

The resulting `.d.ts` file paths will be printed. Additionally, the `.js`
outputs from TypeScript will be written to disk, next to the `.d.ts` files.
outputs from TypeScript will be written to disk, next to the `.d.ts` files <sup>1</sup>.

> <sup>1</sup> The
> [declarationDir](https://www.typescriptlang.org/docs/handbook/compiler-options.html)
> compiler option will be silently overwritten if present.

## Notes

Expand All @@ -92,4 +96,3 @@ In the meantime, we suggest associating the `.bazel` extension with Python in
your editor, so that you get useful syntax highlighting.

[gazelle]: https://github.com/bazelbuild/rules_go/tree/master/go/tools/gazelle

4 changes: 4 additions & 0 deletions internal/common/tsconfig.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ def create_tsconfig(ctx, files, srcs,

"noEmitOnError": False,
"declaration": True,

# We don't support this compiler option (See github #32), so
# always emit declaration files in the same location as outDir.
"declarationDir": "/".join([workspace_path, outdir_path]),
"stripInternal": True,

# Embed source maps and sources in .js outputs
Expand Down