aspect-build / rules_ts

Bazel rules for the `tsc` compiler from http://typescriptlang.org
https://docs.aspect.build/rules/aspect_rules_ts
Apache License 2.0
94 stars 53 forks source link

support isolated declarations #636

Open MichaelMitchell-at opened 1 week ago

MichaelMitchell-at commented 1 week ago

Changes are visible to end-users: yes

Test plan

CLAassistant commented 1 week ago

CLA assistant check
All committers have signed the CLA.

aspect-workflows[bot] commented 1 week ago

Test

All tests were cache hits

80 tests (100.0%) were fully cached saving 12s.


Buildifier      Format

alexeagle commented 5 days ago

Rebased on the TS upgrade, so this example should be functional now. I'd still like to verify all the actions have expected inputs and outputs, and maybe add an analysis test showing that.

ericrafalovsky commented 4 days ago

Perhaps out of scope of this PR, but it would be interesting to consider an API similar to https://docs.aspect.build/rulesets/aspect_rules_ts/docs/rules#transpiler to allow specifying a non-tsc decleration emit tool (such as swc)

alexeagle commented 4 days ago

TypeScript doesn't ship a release yet that calls the new transpileDeclaration API, and I don't know of another tool that does. Maybe we'll have to cut scope here to just support the part of the feature which verifies your code is ready for isolatedDeclarations semantics but doesn't actually give the speed improvement yet.

alexeagle commented 4 days ago

Merged a PR on rules_swc to mirror the newest release that has the declaration emit feature, I'll give it a try...