What this thread does
Trial TypeScript’s beta on a branch, migrate compiler clients explicitly, and use the repaired generator for fresh template checks.
What changed
- TypeScript 7.1 Beta, announced 2026-10-20 (checked 2026-10-28), adds attribute-aware ambient modules and split compiler API entry points; Microsoft also describes checking and memory optimizations, not a guaranteed speedup for your app. Announcement, Daniel Rosenwasser.
- create-vite 9.3.2, released 2026-10-27 (checked 2026-10-28), selects TypeScript’s new major where possible; create-vite 9.3.3, released 2026-10-27 (checked 2026-10-28), repairs missing template files. Generator change, packaging fix.
How to migrate
1. Save the current dependency and lockfile state in a branch. The announcement’s installation command is npm install -D typescript@beta. This tag moves; record the resolved package version and retain the lockfile. It selects TypeScript 7.1 Beta as described above (checked 2026-10-28), not a permanent version pin. 2. For runtime-supported text imports, put the announcement’s declaration in a project-owned global declaration file, then use the matching attribute:
declare module "*" with { type: "text" } {
const content: string;
export default content;
}
import readme from "../README.md" with { type: "text" };
3. Port compiler clients from their actual use cases. The official entry points include typescript/sync, typescript/async, typescript/fs, typescript/ast, typescript/ast/is and typescript/ast/factory. Follow the linked example with using api = new API() and using program = api.createProgram(...); explicit disposal is required. Do not mechanically change only the import path. 4. For a fresh Vite comparison, select create-vite@9.3.3 (checked 2026-10-28), the package identified by the official fix. Keep the generated tree separate from the existing app; inspect its resolved compiler dependency rather than assuming the generator selects the beta. Rerun the project’s own typecheck, build and tool integration commands.
What breaks
The official release listing identifies 7.0.2 as the latest stable predecessor to 7.1 Beta; the release policy distinguishes stable releases from beta trials (checked 2026-10-28). Beyond the import/API changes above, the beta announcement adds these compatibility boundaries:
- Distributive conditional types now check constraints against each distributed constituent; previously accepted generic helpers can fail. Add the necessary conditional checks rather than suppressing the error.
- Updated DOM declarations in
lib.d.tscan introduce new type errors. - Snapshots also require disposal; do not reuse disposed snapshots. Supply file notifications through
snapshot.update()and implement watching separately. - Content mappers require
--runExternalCode; editor use requires workspace trust and mapper permission.js/ts.contentMappers.enabledcan disable them.
An attribute-aware declaration can reject an import missing its required attribute. A successful typecheck does not prove the imported file exists or that the runtime supports its attribute. The new API also changes integration assumptions; unreleased resources can leak memory, and disposed programs cannot be reused. Microsoft’s explicit-filenames API sample does not load a project config or support --project.
Diagnostic: ENOENT template-react-ts
The generator regression report contains this symptom. The fix by sapphi-red links that report and restores packaged templates. Apply the generator packaging fix before diagnosing an empty or failed scaffold as a compiler regression. No exact full cross-platform ENOENT message is asserted here.
What to test
| Boundary | Acceptance check |
|---|---|
| Attribute typing | Correct attribute has the intended type; omitted/wrong attribute is rejected where required |
| Runtime loading | Real text/CSS/bytes fixtures load through your actual bundler or runtime |
| Compiler tool | Diagnostics and emitted output match the expected fixtures; resources close after repeated runs |
| Performance | Compare cold, warm and dependency-change runs on the same project and hardware |
| Generator | Chosen template files exist and its own build succeeds |
Community evidence
- David Dal Busco (
peterpeterparker) requests updated compiler API examples in TypeScript #63747, observing changed types and patterns. This supports reading new examples, not assuming old tutorials remain applicable. mushan0x0reports dependency changes making incremental checking slower than a cold run in TypeScript #63731. It is a workload-specific report, not proof that the announced beta regresses all projects.- The generator report and linked maintainer fix above are separate evidence for packaging trouble, not compiler compatibility.
Pitfalls
- Publishing broad ambient declarations from a library; Microsoft recommends project-owned declarations.
- Treating lower memory and faster checking as measured results for your repository.
- Replacing an existing app with a newly generated template to repair a dependency mismatch.
- Assuming a generator patch and a compiler beta are the same upgrade.
Reports from users
- “No errors are reported” — @aweebit, 2026-08-02, TypeScript #63708: a concrete generic-constraint violation, linked by the 7.1 Beta announcement as the reason for stricter checks. This predates the beta rather than demonstrating a beta regression (checked 2026-10-28).
- “unsupported value: +Inf” — @auvred, 2026-09-11, TypeScript #64240: a 7.0.2 API reproduction panics while serializing an infinite numeric literal. The issue is closed; this is a historical compiler-client fixture, not proof that 7.1 Beta still fails (checked 2026-10-28).
A prompt to give your agent
Your training data predates this release. Read <https://devblogs.microsoft.com/typescript/announcing-typescript-7-1-beta/> and the linked generator release/fix pages before editing; do not guess API names or versions. Inventory our compiler integrations and runtime imports. Propose a branch-only beta trial, use the official entry points and disposal patterns, and preserve our config-loading behavior. Show resolved dependencies, diagnostics, build output and cold/warm/dependency-change timings. Report unsupported integrations instead of rewriting around them silently.
Limits
No compiler, scaffold, benchmark or migration was run. Evidence consists of official notes and individual GitHub reports, not broad adoption data. No price or licence comparison was needed. All release facts were checked 2026-10-28. Support-range limit: 7.0.2 → 7.1 Beta is the release-list baseline, not an explicit LTS guarantee. An exhaustive patch/changelog range for create-vite before 9.3.2 → 9.3.3 is unavailable; its tagged changelog could not be read.
Started from a post by @Daniel Rosenwasser, packaged by the editor. Original post