Skip to content

Enable verbatimModuleSyntax in http-client-python emitter - #11517

Merged
Timothee Guerin (timotheeguerin) merged 1 commit into
microsoft:mainfrom
timotheeguerin:type-import-emitter-python
Jul 31, 2026
Merged

Timothee Guerin (timotheeguerin) merged 1 commit into
microsoft:mainfrom
timotheeguerin:type-import-emitter-python

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

Extends the ongoing verbatimModuleSyntax rollout to the standalone Python client emitter (@typespec/http-client-python).

verbatimModuleSyntax makes TypeScript emit imports/exports exactly as written, keeping type-only imports out of the runtime module graph. This is the same flag already enabled across most workspace packages; this PR turns it on for the Python emitter's TypeScript layer.

What changed:

  • Add "verbatimModuleSyntax": true to emitter/tsconfig.json.
  • Convert type-only imports/exports to import type / export type (oxlint autofix, plus a export type split for the options re-export in emitter/src/index.ts).

No runtime behavior change — a dev-only TypeScript configuration/import-style change.

Add verbatimModuleSyntax to the emitter tsconfig and convert type-only
imports/exports to import type / export type.
@microsoft-github-policy-service microsoft-github-policy-service Bot added the emitter:client:python Issue for the Python client emitter: @typespec/http-client-python label Jul 31, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 31, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-python@11517

commit: c3fd950

@github-actions

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • ✅ @typespec/http-client-python
Show changes

@typespec/http-client-python - internal ✏️

Enable verbatimModuleSyntax in the emitter's TypeScript config and convert type-only imports/exports to import type/export type.

@azure-sdk-automation

azure-sdk-automation Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Merged via the queue into microsoft:main with commit 28b2c8c Jul 31, 2026
42 checks passed
@timotheeguerin
Timothee Guerin (timotheeguerin) deleted the type-import-emitter-python branch July 31, 2026 19:12
Timothee Guerin (timotheeguerin) added a commit that referenced this pull request Aug 7, 2026
Completes the `verbatimModuleSyntax` rollout by turning the flag on
centrally in `tsconfig.base.json`, so every package inherits it instead
of opting in individually.

Now that all workspace packages and the three standalone client emitters
(C#/Java/Python) have been converted to type-only imports/exports, the
per-package overrides are redundant. This PR:

- Adds `"verbatimModuleSyntax": true` to `tsconfig.base.json`.
- Removes the now-redundant per-package `verbatimModuleSyntax: true`
overrides (48 tsconfigs).
- Keeps the single intentional `verbatimModuleSyntax: false` in
`packages/http-client-js/tsconfig.test.json` (generated e2e fixtures
that aren't emitted with type-only imports).
- Folds in the http-client-java emitter conversion so the base flip is
self-contained and green regardless of merge order (also tracked
standalone in #11516).

No runtime behavior change — a dev-only TypeScript configuration change.

Depends on the per-package rollout PRs having merged first (#11484,
#11510, #11512, #11513, #11514, #11515, #11516, #11517).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:python Issue for the Python client emitter: @typespec/http-client-python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants