-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
feat: support custom dts transpiler #697
Conversation
a632daa
to
acc56ce
Compare
TODO: tests, I think swc isn't ready (swc-project/swc#9512) so we might have to try something else, even just a |
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 tested this out on our repo and I ran into some issues. I think if my comments are addressed we'll be good though!
c618b8c
to
11b0e5f
Compare
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.
Tested it out on our code base. Works great!
11b0e5f
to
4974ec4
Compare
Updated. See the outline of targets I put into the PR description. IMO the |
4974ec4
to
886553a
Compare
fcf31d6
to
e62bfb9
Compare
e62bfb9
to
c176afa
Compare
1bc27d8
to
89b66fe
Compare
89b66fe
to
628a19a
Compare
Support a custom transpiler for producing dts files.
Overview of targets created:
{name}
outputs aJsInfo
containing all transpiled files, no guarantee if this runs tsc, no guarantee it outputs anything such asno_emit = True
If any transpiler or no_emit is used then the following are also created:
{name}_types
ifdeclaration: True && not no_emit
: dts files inDefaultInfo
{name}_tsc
invokes tsc, maybe outputting something, maybe doing type-checking, maybe both{name}_typecheck
outputs something when type-checking passes{name}_typecheck_test
forces{name}_typecheck
to build and therefor forces type-checkingChanges are visible to end-users: yes
A custom dts transpiler can now be set using
ts_project(declaration_transpiler)
. This aligns dts transpiling with js transpiling allowing fast transpiling of all files, only requiring invoking tsc for a type-checking action.Test plan