Skip to content

Enable verbatimModuleSyntax on small-tier packages - #11480

Open
timotheeguerin wants to merge 2 commits into
microsoft:mainfrom
timotheeguerin:type-import-pass-2
Open

Enable verbatimModuleSyntax on small-tier packages#11480
timotheeguerin wants to merge 2 commits into
microsoft:mainfrom
timotheeguerin:type-import-pass-2

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

Summary

Second pass of the verbatimModuleSyntax rollout, covering the "small tier" packages. Follows #11479 (easy 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/samples
  • @typespec/spec-api
  • @typespec/openapi
  • @typespec/spec-dashboard
  • @typespec/rest

How

  • Import conversions were applied with the sanctioned linter autofix (oxlint typescript/consistent-type-imports and typescript/consistent-type-exports, --type-aware), which uses the separate-type-imports style.
  • Remaining re-export cases (export type) were fixed the same way.

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).
  • Larger packages (e.g. http, openapi3, compiler) are deferred to later passes.

Validation

  • tsc -b emit build for samples/spec-api/openapi/rest; type-check for spec-dashboard (vite build)
  • prettier --check on all changed files
  • oxlint --type-aware --deny-warnings on all 5 packages
  • chronus verify

Enable verbatimModuleSyntax in tsconfig.json for samples, spec-api,
openapi, spec-dashboard and rest, converting type-only imports and
re-exports to import type / export type accordingly.
@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/openapi@11480
npm i https://pkg.pr.new/@typespec/rest@11480
npm i https://pkg.pr.new/@typespec/spec-api@11480

commit: d38030e

@github-actions

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @typespec/openapi
  • @typespec/rest
  • @typespec/spec-api
Show changes

@typespec/spec-api - internal ✏️

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

@typespec/openapi - internal ✏️

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

@typespec/rest - internal ✏️

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

@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:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant