microsoft-typescript
TypeScript is a language for application scale JavaScript development. ALWAYS use when editing or working with *.ts, *.tsx, *.mts, *.cts files or code importing \"typescript\". Consult for debugging, best practices, or modifying typescript, TypeScript.
skilld-dev · Static checks on file
Installation
Read the source and dependencies before running a command. Copying does not install or execute anything.
npx skills add skilld-dev/skilld --skill microsoft-typescriptAbout this skill
name: microsoft-typescript description: "TypeScript is a language for application scale JavaScript development. ALWAYS use when editing or working with *.ts, *.tsx, *.mts, *.cts files or code importing "typescript". Consult for debugging, best practices, or modifying typescript, TypeScript." metadata: version: 6.0.2 generated_by: cached generated_at: 2026-03-24
microsoft/TypeScript typescript
TypeScript is a language for application scale JavaScript development
Version: 6.0.2 Tags: dev: 3.9.4, tag-for-publishing-older-releases: 4.1.6, insiders: 4.6.2-insiders.20220225, latest: 6.0.2, beta: 6.0.0-beta, rc: 6.0.1-rc, next: 6.0.0-dev.20260323
References: package.json — exports, entry points • README — setup, basic usage • Docs — API reference, guides • GitHub Issues — bugs, workarounds, edge cases • Releases — changelog, breaking changes, new APIs
Search
Use skilld search "query" -p typescript instead of grepping .skilld/ directories. Run skilld search --guide -p typescript for full syntax, filters, and operators.
API Changes
This section documents version-specific API changes for TypeScript v5.7+, prioritizing recent major/minor releases.
-
BREAKING:
ArrayBufferno longer supertype ofTypedArraytypes — v5.9 changedArrayBufferrelationships; methods expectingArrayBuffernow rejectUint8Array,Buffer, etc. Fix by accessing.bufferproperty or using specificUint8Array<ArrayBuffer>types source -
NEW:
import defer * as ns from "module"— v5.9 syntax for deferred module evaluation; module loading deferred until namespace accessed, useful for conditional/lazy imports. Only supports namespace imports, not named/default exports source -
BREAKING:
TypedArraygenerics overArrayBufferLike— v5.7+ made allTypedArraytypes generic (Uint8Array<TArrayBuffer>), breaking code passingBuffer/Uint8ArraywhereArrayBufferexpected. Update@types/nodeand specify explicit buffer type or use.bufferproperty source -
NEW:
--module node20— v5.9 stable option modeling Node.js v20 behavior; unlikenodenext, implies--target es2023and is not floating. Use when locked to Node.js v20 source -
NEW:
--erasableSyntaxOnlyoption — v5.8 flag for Node.js 23.6+--experimental-strip-typesmode; errors on non-erasable TypeScript constructs (enum,namespacewith code, parameter properties,import =,export =) source -
NEW:
--module node18— v5.8 stable option for Node.js 18; disallowsrequire()of ESM but allows import assertions (unlikenodenext) source -
NEW:
require()of ECMAScript modules — v5.8--module nodenextnow permitsrequire("esm")from CommonJS (Node.js 22+), except for ESM with top-levelawaitsource -
BREAKING: Import assertions deprecated in
--module nodenext— v5.8 rejectsassert { type: "json" }syntax in favor ofwith { type: "json" }source -
NEW:
--rewriteRelativeImportExtensionsoption — v5.7 compiler option rewrites relative.tsimports to.jswhen emitting, enabling in-place execution then compilation source -
NEW:
--target es2024and--lib es2024— v5.7 support for ES2024 features (Object.groupBy,Map.groupBy,Promise.withResolvers,SharedArrayBuffertypes) source -
NEW: Granular return expression checking — v5.8 type-checks each branch of conditional
returnstatements against declared return type, catching type mismatches withanycorruption source -
BREAKING: JSON import validation in
--module nodenext— v5.7 requireswith { type: "json" }attribute for JSON imports; no named exports, only default source -
NEW:
--libReplacementflag — v5.8 option to disable/enable@typescript/lib-*package lookup; default behavior may change in future versions source -
BREAKING: Index signatures from non-literal class methods — v5.7 now generates index signatures for non-literal computed method names (e.g.,
[symbolName]() {}), changing class type shape source -
NEW: Preserved computed property names in declarations — v5.8 preserves entity names (bare variables, dotted names) in computed property declarations in classes source
Also changed: Checks for
Read the complete source ↗