Enable verbatimModuleSyntax for http-client and http-client-js - #11484
Open
timotheeguerin wants to merge 5 commits into
Open
Enable verbatimModuleSyntax for http-client and http-client-js#11484timotheeguerin wants to merge 5 commits into
timotheeguerin wants to merge 5 commits into
Conversation
Add "verbatimModuleSyntax": true to both packages' tsconfig and convert type-only imports to import type via oxlint type-aware autofix.
commit: |
Contributor
|
All changed packages have been documented.
|
|
You can try these changes here
|
oxlint's consistent-type-exports converted `export * from ./operation.js` (and model / model-property) to `export type *`. Those kit modules only export types but run `defineKit(...)` at import time to register typekit methods; `export type *` drops the module so registration never happens, causing `$.operation.getClientSignature is not a function` at emit time.
…d fixtures
tsconfig.test.json extends the package tsconfig (now verbatimModuleSyntax:
true) and compiles the emitter's generated e2e client code under
test/e2e/generated, which uses plain `import { X }` for type-only imports.
That is emitter output, not authored source, so override
verbatimModuleSyntax to false for the e2e test build.
timotheeguerin
marked this pull request as ready for review
July 30, 2026 17:43
timotheeguerin
requested review from
MaryGao,
catalinaperalta,
iscai-msft,
maorleger,
markcowl,
qiaozha and
xirzec
as code owners
July 30, 2026 17:43
timotheeguerin
enabled auto-merge
July 30, 2026 18:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of an incremental rollout of TypeScript's
verbatimModuleSyntaxacross the monorepo, one batch of packages per PR (ordered easiest → hardest). This is batch 4.Packages migrated
@typespec/http-client(84 type-only imports)@typespec/http-client-js(112 type-only imports)What changed
"verbatimModuleSyntax": trueto each package'stsconfig.json.import type/export typeusing oxlint's type-awareconsistent-type-imports/consistent-type-exportsautofix.Using the type-aware autofix (rather than a manual TS1484-driven pass) also correctly handles class imports used only in type positions — classes are both a type and a value, so
verbatimModuleSyntaxdoes not flag them, yet leaving them as runtime imports changes emit.Validation
tscreports 0verbatimModuleSyntaxerrors for both packages.alloy buildsucceeds for both packages.--type-aware --deny-warnings) clean.Standalone runtime emitters (
http-client-csharp,http-client-java,http-client-python) remain out of scope.