-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(typescript): update documentation now that ts_project is recommended #2548
Conversation
b1a8220
to
3de859d
Compare
packages/typescript/_README.md
Outdated
Then call it, using the [`npm_package_bin`](Built-ins#npm_package_bin) documentation. | ||
|
||
Here is an example: | ||
https://github.com/bazelbuild/rules_nodejs/blob/stable/internal/node/test/BUILD.bazel#L491-L507 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: don't link to the lines as they will likely change and we'll forget to update the docs
"An example of using tsc
directly can be seen in the nodejs tests BUILD.bazel file"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to point to the right spot in the file too, it's very long. I pinned to 3.2.2 rather than stable so we don't break the link
packages/typescript/_README.md
Outdated
|
||
### ts_project | ||
|
||
`ts_project` simply runs `tsc --project`, with Bazel knowing which outputs to expect based on the TypeScript compiler options, and with interoperability with other TypeScript rules via a Bazel Provider (DeclarationInfo) that transmits the type information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to provider docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah - it's so hard to get the links right tho, so they work in both markdown and on the rendered docsite, let's try...
packages/typescript/_README.md
Outdated
Here, `//path/to/other:library` is another target in your repo that produces TypeScript typings (for example, another `ts_project` rule). To use third-party libraries from npm, first install them (likely using `npm_install` or `yarn_install` rules) then add those to the `deps` as well: | ||
|
||
```starlark | ||
ts_library( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean ts_project
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops!
We don't deprecated ts_library yet
3de859d
to
48fc45b
Compare
We don't deprecate ts_library yet