Skip to content

Enable verbatimModuleSyntax on medium-tier packages - #11481

Merged
timotheeguerin merged 4 commits into
microsoft:mainfrom
timotheeguerin:type-import-pass-3
Jul 30, 2026
Merged

Enable verbatimModuleSyntax on medium-tier packages#11481
timotheeguerin merged 4 commits into
microsoft:mainfrom
timotheeguerin:type-import-pass-3

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

Summary

Third pass of the verbatimModuleSyntax rollout, covering the "medium tier" packages. Follows #11479 (easy tier) and #11480 (small tier). Adds "verbatimModuleSyntax": true to each package's tsconfig.json and converts type-only imports/re-exports to import type / export type.

Packages migrated

  • @typespec/protobuf
  • @typespec/http-specs
  • @typespec/spector
  • typespec-vscode

How

  • Import/export conversions were applied with the sanctioned linter autofix (oxlint typescript/consistent-type-imports and typescript/consistent-type-exports, --type-aware, separate-type-imports style).

Out of scope

  • tsconfig.base.json is intentionally untouched (that would force all packages at once).
  • Standalone runtime emitters (http-client-csharp, http-client-java, http-client-python).
  • Remaining larger packages (http-client, http-client-js, tspd, http-server-js, http, openapi3, compiler) are deferred to later passes.

Validation

  • tsc -b emit build for protobuf/http-specs/spector; tsc --noEmit type-check for typespec-vscode (esbuild build)
  • prettier --check on all changed files
  • oxlint --type-aware --deny-warnings on all 4 packages
  • chronus verify (changeset covers the 3 publishable packages; typespec-vscode is private)

Enable verbatimModuleSyntax in tsconfig.json for protobuf, http-specs,
spector and typespec-vscode, converting type-only imports and re-exports
to import type / export type accordingly.
@microsoft-github-policy-service microsoft-github-policy-service Bot added ide Issues for VS, VSCode, Monaco, etc. lib:http-specs For issues/prs related to the @typespec/http-specs package emitter:protobuf The protobuf emitter spector Issues related to spector and the spec sets labels Jul 30, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-specs@11481
npm i https://pkg.pr.new/@typespec/protobuf@11481
npm i https://pkg.pr.new/@typespec/spector@11481

commit: 555bcf5

@github-actions

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @typespec/http-specs
  • @typespec/protobuf
  • @typespec/spector
Show changes

@typespec/protobuf - internal ✏️

Enable verbatimModuleSyntax in TypeScript configuration and convert type-only imports and re-exports to import type / export type accordingly.

@typespec/http-specs - internal ✏️

Enable verbatimModuleSyntax in TypeScript configuration and convert type-only imports and re-exports to import type / export type accordingly.

@typespec/spector - internal ✏️

Enable verbatimModuleSyntax in TypeScript configuration and convert type-only imports and re-exports to import type / export type accordingly.

… CJS

Under verbatimModuleSyntax, a fully-inline-type import (import { type X })
is preserved as a side-effect import, which esbuild bundles. That pulled
@typespec/compiler (with top-level await) into the CJS extension bundle and
broke the build. Convert to import type to drop the module reference.
@azure-sdk-automation

azure-sdk-automation Bot commented Jul 30, 2026

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@timotheeguerin
timotheeguerin enabled auto-merge July 30, 2026 18:45
@timotheeguerin
timotheeguerin added this pull request to the merge queue Jul 30, 2026
Merged via the queue into microsoft:main with commit 015a574 Jul 30, 2026
33 checks passed
@timotheeguerin
timotheeguerin deleted the type-import-pass-3 branch July 30, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:protobuf The protobuf emitter ide Issues for VS, VSCode, Monaco, etc. lib:http-specs For issues/prs related to the @typespec/http-specs package spector Issues related to spector and the spec sets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants