Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStatsPractice TestsCertifications

Categories

🎓 Certifications
🤖 Artificial Intelligence
☁️ Cloud and Infrastructure
💾 Data and Databases
💼 Professional Skills
🎯 Programming and Development
🔒 Security and Networking
📚 Specialized Topics
CheatGrid
HomeAboutTopicsPricingMy VaultStatsPractice TestsCertifications
LVLEVEL 0
0/5 XP
GitHub
© 2026 CheatGrid™. All rights reserved.
Privacy PolicyTerms of UseAboutContact

TypeScript Cheat Sheet

TypeScript Cheat Sheet

Tables
Back to Programming Languages
Updated 2026-04-27
Next Topic: WebAssembly (Wasm) Cheat Sheet

TypeScript is a typed superset of JavaScript that adds a static type system and compile-time checks while still running as plain JavaScript after compilation. It matters because it lets teams model data shapes, APIs, and module boundaries explicitly, catching many bugs before runtime and improving editor tooling (navigation, refactors, autocomplete). The key mental model is that TypeScript's checking is mostly structural and happens at compile time — your types don't exist at runtime unless you write runtime validation. TypeScript 5.x has added significant capabilities including Stage 3 decorators, explicit resource management (using/await using), the NoInfer<T> utility type, inferred type predicates, and --erasableSyntaxOnly for Node.js type-stripping workflows.

Quick Index160 entries · 15 tables
Mind Map

15 tables, 160 concepts. Select a concept node to jump to its table row.

Preparing mind map...

Table 1: Type Annotations & Primitive Types

The starting point: how you attach a type to a value, and the built-in primitives you'll annotate with most often. Often you don't write the type at all — inference reads it from the initializer — so the real skill is knowing when an explicit annotation earns its keep. Pay special attention to the three special types at the bottom: any switches checking off, unknown is the safe top type you must narrow first, and never marks code that can't produce a value.

ConceptExampleDescription
Type annotation
let n: number = 42
Explicitly assigns a static type to a variable, parameter, or return value.
Type inference
const s = "hello"
Compiler infers a type from an initializer or usage without an annotation.
string
let name: string = "Ada"
Primitive text type.
number
let pi: number = 3.14159
Primitive floating-point numeric type (JS number).
boolean
let ok: boolean = true
Primitive true/false type.
bigint
const id: bigint = 123n
Primitive for arbitrary-size integers (JS bigint).
symbol
const key: unique symbol = Symbol("k")
• Primitive for unique identifiers
• unique symbol supports nominal-like keys.
null & undefined
let x: string | undefined
• Represent absence
• require explicit handling under strictNullChecks.
any
let data: any = JSON.parse(text)
• Disables type checking for the value — escape hatch
• avoid in new code.
unknown
let data: unknown = JSON.parse(text)
• Safer top type than any
• must be narrowed before property access or calls.
void
function log(msg: string): void { console.log(msg) }
Indicates a function returns no useful value.
never
function fail(msg: string): never { throw new Error(msg) }
Indicates no possible value — unreachable code, always-throws, or exhausted union.

Table 2: Object Shapes (Interfaces, Aliases, Properties)

Most real-world typing is describing the shape of objects, and these are the tools for it. Interfaces and type aliases both name a shape — interfaces add declaration merging and feel natural for extension, aliases handle any type expression — and on top of either you layer optional and readonly properties, index signatures for open-ended keys, and call or construct signatures for objects that are also callable. The excess-property check is the quirk worth remembering: object literals get scrutinized for stray keys in ways stored variables don't.

PatternExampleDescription
Interface
interface User { id: string; name: string }
• Named object shape
• supports extension and declaration merging.
Type alias
type User = { id: string; name: string }
Gives a name to any type expression — primitives, unions, tuples, objects.
Object type literal
const u: { id: string; name: string } = { id: "1", name: "Ada" }
Inline property names and types without naming the type.
Optional property
type User = { name: string; email?: string }
Marks a property as possibly absent.
Readonly property
type User = { readonly id: string; name: string }
Prevents assignment after initialization at the type-checking level.
Extending interfaces
interface Admin extends User { role: "admin" }
Builds larger shapes from smaller ones via extends.
Index signature
type Headers = { [name: string]: string }
Types objects with unknown keys by specifying key/value types.
Call signature
type Fn = { (x: number): string }
Describes a callable object that may also carry properties.
Construct signature
type Ctor = { new (s: string): Date }
Describes a new-able constructor type.
Excess property checks
const u: User = { id: "1", name: "Ada", extra: 1 }
Object literals checked for unknown properties when directly assigned to a type.

Table 3: Type Composition (Unions, Intersections, Literals, Enums)

This is where types start combining into something more expressive than a single shape. Unions say "one of these," intersections say "all of these at once," and literal types pin a value down to an exact string or number — together they're the foundation of modeling states precisely. Tuples, as const, and the two flavors of enum round it out, with the notes flagging which constructs emit runtime code (string and numeric enums) versus which vanish at compile time.

TypeExampleDescription
Union type
type ID = string | number
Value can be one of multiple types.
Intersection type
type WithId = { id: string } & { createdAt: Date }
Value must satisfy all combined types simultaneously.
Const assertion (as const)
const roles = ["admin", "user"] as const
Infers the narrowest literal and readonly types for an expression.
String literal type
type Role = "admin" | "user"
Restricts values to specific string constants.
Numeric literal type
type Dice = 1 | 2 | 3 | 4 | 5 | 6
Restricts values to specific numeric constants.
Tuple type
const pair: [string, number] = ["a", 1]
Fixed-length array with positional element types.
Non-null assertion (!)
user!.id
Asserts a value is not null/undefined for type checking (erased at runtime).
Enum (string)
enum Role { Admin = "admin", User = "user" }
• Members have explicit string values at runtime
• more debuggable than numeric enums.
Enum (numeric)
enum Status { Pending, Done }
• Named constants that emit a runtime JS object
• auto-increments from 0.
Const enum
const enum Dir { Up, Down }
• Inlines enum values at emit time — no runtime object
• avoid in public declaration files.

Table 4: Functions (Signatures, Generics, Overloads)

Typing functions covers everything from a plain parameter list to generics that carry types through a call. Generics and their extends constraints are the heart of reusable, type-safe utilities, while overloads let one implementation present several distinct call signatures. The smaller entries — optional, default, and rest parameters, plus newer touches like const type parameters — handle the everyday details of getting arguments and return values typed cleanly.

PatternExampleDescription
Function type expression
type Mapper = (x: number) => string
Describes a function's parameter and return types as a type alias.
Generic function
function first<T>(xs: T[]): T { return xs[0] }
Parameterizes types with <T> for reusable, type-safe logic.
Generic constraint
function len<T extends { length: number }>(x: T) { return x.length }
Restricts a type parameter with extends so required members can be accessed.
Function overloads
function parse(x: string): number;<br> function parse(x: number): string;<br> function parse(x: string | number) { return typeof x === "string" ? +x : String(x) }
Multiple call signatures with one implementation below them.
Optional parameter
function greet(name?: string) {}
• Parameter may be omitted
• typed as possibly undefined inside the function.
Default parameter
function inc(n: number = 1) { return n + 1 }
Supplies a default value when the argument is missing or undefined.
Rest parameter
function sum(...ns: number[]) { return ns.reduce((a,b)=>a+b, 0) }
Collects remaining arguments into a typed array.
Const type parameter
function identity<const T>(val: T): T { return val }
identity(["a","b"]) // T inferred as ["a","b"] not string[]
Infers the narrowest literal type from a call-site argument (TS 5.0+).
Default type parameter
type ApiResult<T = unknown> = { data: T }
Provides a fallback when type arguments are not supplied or inferred.
this parameter
function f(this: Date) { return this.getTime() }
Fake first parameter to type this (erased in output).
Call signature + properties
type Fn = { (x: string): string; tag: string }
Models callable values that also carry properties.

Table 5: Classes (Members, Modifiers, Inheritance)

TypeScript classes are JavaScript classes with a type layer bolted on: the same fields, methods, and inheritance, plus visibility modifiers, readonly, and implements/abstract for enforcing contracts. Parameter properties are the time-saver — declaring and assigning a field straight from the constructor signature — and the override keyword (with noImplicitOverride) makes inheritance refactors safe. Note that private here is a compile-time guarantee, whereas JS # fields are genuinely private at runtime.

ConceptExampleDescription
Class declaration
class User { constructor(public id: string) {} }
• Defines fields/methods with type annotations
• emits a JS class.
Parameter properties
class User { constructor(public readonly id: string) {} }
Shorthand that declares and initializes a member from a constructor parameter.
public / private / protected
class A { private secret = 1; protected n = 2; public id = "x" }
• Controls member visibility in type checking
• use # for hard JS private fields.
readonly fields
class A { readonly id = "x" }
Prevents reassignment after construction at the type-checking level.
implements
class Repo implements Iterable<string> { [Symbol.iterator]() { return [][Symbol.iterator]() } }
Checks a class satisfies an interface at compile time.
extends (inheritance)
class B extends A {}
Subclassing with super calls and overriding.
abstract class
abstract class Base { abstract run(): void }
• Cannot be instantiated directly
• may declare abstract members subclasses must implement.
Method override
class B extends A { override toString() { return "B" } }
• Replaces a base member
• override keyword enforces the base member exists.
Accessors (get/set)
class A { get x() { return this._x } set x(v: number) { this._x = v } }
Declares typed property accessors.
Static initialization block
class C { static count = 0; static { C.count = 1 } }
Runs complex static setup code with access to private members (TS 4.4+).
noImplicitOverride
// tsconfig.json<br> { "compilerOptions": { "noImplicitOverride": true } }
Requires override keyword on all overriding members for safer refactors.

Table 6: Narrowing (Type Guards & Control Flow)

Narrowing is how a broad union type collapses to a specific one inside a branch — the compiler watches your control flow and tracks what a value can still be. The everyday guards reuse plain JavaScript checks (typeof, instanceof, in, truthiness, equality), and discriminated unions make this effortless by tagging each variant with a shared literal field. When the built-in checks aren't enough, type predicates and assertion functions let you teach the compiler your own narrowing logic, and the exhaustiveness pattern catches the case you forgot.

TechniqueExampleDescription
typeof narrowing
if (typeof x === "string") x.toUpperCase()
Narrows unions using JS typeof checks.
instanceof narrowing
if (e instanceof Error) console.error(e.message)
Narrows via prototype chain checks.
in-operator narrowing
if ("id" in obj) obj.id
Narrows based on property existence.
Truthiness narrowing
if (s) s.trim()
Narrows based on falsy/truthy JavaScript semantics.
Equality narrowing
if (x === null) return
Narrows unions with === / !== comparisons.
Discriminated union
type Shape = { kind: "circle"; r: number } | { kind: "square"; s: number }
Uses a shared literal field (kind) to narrow via switch/if checks.
Type predicate
function isError(x: unknown): x is Error { return x instanceof Error }
User-defined guard that narrows a value to a specific type.
Inferred type predicate
const isString = (x: unknown) => typeof x === "string"
TS 5.5+ automatically infers x is string from a boolean-returning function body — no explicit annotation needed.
Assertion function (asserts)
function assertNonNull(x: unknown): asserts x { if (x == null) throw new Error() }
Narrows by asserting a condition holds when the function returns normally.
Exhaustiveness check
const _exhaustive: never = value
Forces the compiler to prove all union cases are handled — errors if a case is missed.

Table 7: Type Operators & Advanced Types

This is type-level programming: operators that compute new types from existing ones rather than just declaring them. keyof, typeof, and indexed access read structure out of other types; mapped types, conditional types, and infer transform and branch on it; template literal types build string types programmatically. It's the most powerful corner of TypeScript and the steepest — but it's what lets a library's types stay perfectly in sync with its data. The satisfies operator is a gentler standout, validating a value against a type without throwing away its narrower inferred shape.

OperatorExampleDescription
Type assertion (as)
const input = document.getElementById("id") as HTMLInputElement
• Overrides TypeScript's inferred type
• no runtime effect. Use when you know more than the compiler.
Double assertion
const x = value as unknown as TargetType
• Forces conversion between unrelated types via the unknown intermediate
• use sparingly.
typeof (type context)
const cfg = { mode: "dev" as const }; type Cfg = typeof cfg
Extracts a type from a runtime value's shape.
keyof
type Keys = keyof User
Produces a union of property keys from an object type.
Indexed access type
type UserId = User["id"]
Looks up a property type from another type via T[K].
satisfies
const routes = { home: "/" } satisfies Record<string, string>
Checks an expression matches a type without widening the expression's own inferred type.
Mapped type
type RO<T> = { readonly [K in keyof T]: T[K] }
Creates a new object type by iterating over keys.
Conditional type
type IsString<T> = T extends string ? true : false
Chooses a type based on an extends relationship test.
Template literal types
type EventName = `on${Capitalize<string>}`
Builds string types via template literal syntax over string unions.
Key remapping (as)
type Getters<T> = { [K in keyof T as `get${Capitalize<string & K>}`]: () => T[K] }
Renames or filters keys while mapping with the as clause.
Distributive conditional type
type ToArray<T> = T extends any ? T[] : never
Distributes over unions when the checked type is a naked type parameter.
infer
type Elem<T> = T extends (infer U)[] ? U : T
Introduces an inferred type variable inside a conditional type.
Variance annotations (in/out)
type ReadRef<out T> = { readonly value: T }
type Writer<in T> = { write(x: T): void }
• out = covariant (used in output position only)
• in = contravariant (input only); improves checker accuracy (TS 4.7+).
Recursive types
type JSON = string | number | boolean | null | JSON[] | { [k: string]: JSON }
• A type alias that references itself
• supported since TS 3.7 via deferred resolution.

Table 8: Utility Types (Built-in)

These ship with TypeScript and save you from hand-writing the same transformations over and over. Partial, Required, Readonly, Pick, and Omit reshape object types; Record builds dictionaries; Exclude, Extract, and NonNullable filter unions; and ReturnType, Parameters, and Awaited extract pieces out of functions and promises. Knowing this set well means you rarely need to reach for mapped or conditional types directly — they're already wrapped up here.

TypeExampleDescription
Partial<T>
type Patch = Partial<User>
Makes all properties of T optional.
Required<T>
type StrictUser = Required<User>
Makes all properties of T required.
Readonly<T>
type Frozen = Readonly<User>
Makes all properties of T readonly.
Pick<T, K>
type UserRef = Pick<User, "id" | "name">
Selects a subset of properties by key.
Omit<T, K>
type PublicUser = Omit<User, "email">
Removes properties by key.
Record<K, T>
type ById = Record<string, User>
Maps keys K to value type T.
Exclude<T, U>
type NonString = Exclude<string | number, string>
Removes from T the members assignable to U.
Extract<T, U>
type OnlyString = Extract<string | number, string>
Keeps from T only the members assignable to U.
NonNullable<T>
type NN = NonNullable<string | null | undefined>
Removes null and undefined from a type.
ReturnType<T>
type R = ReturnType<() => Promise<number>>
Extracts a function type's return type.
Parameters<T>
type P = Parameters<(x: string, y: number) => void>
Extracts a function type's parameter tuple.
Awaited<T>
type V = Awaited<Promise<string>>
Recursively unwraps the resolved value type of a promise-like.
ConstructorParameters<T>
class C { constructor(a: string, b: number) {} }
type P = ConstructorParameters<typeof C> // [string, number]
Extracts a constructor's parameter types as a tuple.
InstanceType<T>
type I = InstanceType<typeof User>
Extracts the instance type of a constructor function type.
NoInfer<T>
function createStore<T>(init: T, fallback: NoInfer<T>): T { return init ?? fallback }
Blocks type inference from the wrapped position, forcing T to be inferred from other arguments (TS 5.4+).
ThisType<T>
const mixin: ThisType<{ x: number }> = { getX() { return this.x } }
Specifies the this type for methods in an object literal (requires noImplicitThis).
Uppercase<S> / Lowercase<S>
type U = Uppercase<"hello"> // "HELLO"
Intrinsic string types that transform string literal types to upper/lower case (TS 4.1+).
Capitalize<S> / Uncapitalize<S>
type C = Capitalize<"world"> // "World"
Intrinsic string types that capitalize or uncapitalize the first character of a string literal type (TS 4.1+).
ThisParameterType<T>
type T = ThisParameterType<(this: Date) => void> // Date
Extracts the this parameter type from a function type.
OmitThisParameter<T>
type F = OmitThisParameter<(this: Date, x: string) => void>
Removes the this parameter from a function type.

Table 9: Decorators

Decorators wrap classes and their members to add or alter behavior — the @-prefixed syntax you've seen in frameworks like Angular and NestJS. TypeScript 5.0 adopted the standardized Stage 3 form, where each decorator receives a context object and can replace what it decorates, and 5.2 added a metadata channel via Symbol.metadata. The crucial caveat is that the new Stage 3 decorators are not compatible with the older experimentalDecorators syntax, so libraries pin themselves to one or the other.

DecoratorExampleDescription
Class decorator
function sealed(Base: typeof C, ctx: ClassDecoratorContext) {}
@sealed class C {}
• Wraps or replaces a class
• receives the class and a context object (TS 5.0 Stage 3 syntax).
Method decorator
function log(fn: Function, ctx: ClassMethodDecoratorContext) { return function(this: any, ...args: any[]) { return fn.apply(this, args) } }
class C { @log greet() {} }
• Wraps a method
• the replacement function is returned.
Field decorator
function init<T>(val: T) { return (_: undefined, _ctx: ClassFieldDecoratorContext) => () => val }
class C { @init("Ada") name!: string }
• Intercepts field initialization
• return an initializer function to override the default value.
Accessor decorator
function bound(fn: Function, ctx: ClassAccessorDecoratorContext) {}
class C { @bound accessor name = "Ada" }
Decorates an accessor keyword field, which auto-generates a getter/setter pair.
Getter/setter decorator
function configurable(fn: Function, ctx: ClassGetterDecoratorContext) {}
class C { @configurable get x() { return 1 } }
Decorates a getter or setter individually.
Decorator metadata
function meta(_: any, ctx: DecoratorContext) { ctx.metadata.info = "x" }
@meta class C {}; C[Symbol.metadata]
• TS 5.2+ adds Symbol.metadata to classes
• decorators can store metadata accessible at runtime.
experimentalDecorators (legacy)
// tsconfig.json<br> { "compilerOptions": { "experimentalDecorators": true } }
• Enables the pre-Stage-3 legacy decorator syntax used by Angular, NestJS, and older libraries
• incompatible with new Stage 3 decorators.

Table 10: Modules & Imports

How code is split across files and how TypeScript resolves and emits those boundaries. Standard ESM import/export is fully type-checked, and the type-only variants (import type / export type) signal that a symbol exists purely for the type system and should be erased from the output. The cluster of tsconfig options here — moduleResolution, module, esModuleInterop, paths — is what reconciles TypeScript with the realities of Node.js and bundlers, and is a frequent source of confusing import errors.

PatternExampleDescription
ES module import/export
import { readFile } from "node:fs/promises"
Standard ECMAScript module syntax, fully type-checked by TS.
Type-only import (import type)
import type { User } from "./types"
Imports a symbol only for the type system — erased entirely at runtime.
Type-only export (export type)
export type { User } from "./types"
Re-exports types without a runtime export.
Import attributes
import data from "./data.json" with { type: "json" }
• Instructs the runtime how to load a module (e.g., JSON)
• ECMAScript 2025, supported from TS 5.3.
verbatimModuleSyntax
// tsconfig.json<br> { "compilerOptions": { "verbatimModuleSyntax": true } }
Preserves import/export statements literally and enforces import type for type-only imports.
ESM/CJS interop
import pkg from "cjs-only"
Covers how TS models default/namespace imports across ESM and CommonJS boundaries.
esModuleInterop
// tsconfig.json<br> { "compilerOptions": { "esModuleInterop": true } }
Adjusts emit and checking for default/namespace imports to match Node.js/bundler behavior.
allowSyntheticDefaultImports
// tsconfig.json<br> { "compilerOptions": { "allowSyntheticDefaultImports": true } }
Allows default imports from modules without a default export (type-checking convenience only).
moduleResolution
// tsconfig.json<br> { "compilerOptions": { "moduleResolution": "bundler" } }
Selects how imports are resolved: node16, nodenext, or bundler for modern tooling.
module
// tsconfig.json<br> { "compilerOptions": { "module": "nodenext" } }
Selects the emitted module format and influences resolution behavior.
baseUrl / paths
// tsconfig.json<br> { "compilerOptions": { "baseUrl": ".", "paths": { "@/*": ["src/*"] } } }
Adds path mapping for module specifiers during type checking and emit.

Table 11: JSX / TSX

If you write React or any JSX-based UI, these are the knobs that make it type-check. The .tsx extension turns on JSX parsing, the jsx compiler option decides whether that syntax is transformed or preserved, and jsxImportSource points the automatic runtime at the right factory — so you can target Preact or another library instead of React. JSX.IntrinsicElements is where the set of valid built-in tags and their props lives.

OptionExampleDescription
TSX file extension
// Component.tsx<br> export function Button() { return <button /> }
Enables JSX syntax in TypeScript source files with .tsx.
jsx
// tsconfig.json<br> { "compilerOptions": { "jsx": "react-jsx" } }
Controls how JSX is transformed or preserved by the compiler.
jsxImportSource
// tsconfig.json<br> { "compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" } }
Sets the module for importing jsx/jsxs factories for the automatic runtime.
JSX.IntrinsicElements
declare namespace JSX { interface IntrinsicElements { div: any } }
Declares valid JSX tags and their prop types for type checking.

Table 12: TSConfig Core (Type Checking, Emit, Projects)

The compiler options you'll actually set in tsconfig.json, grouped around three jobs: how strictly to check, what to emit, and how to structure multi-package builds. Turning on strict is the single most consequential choice — it bundles a family of safety flags and is the recommended baseline for any new project. The rest control output (target, lib, declaration, noEmit), build speed (incremental, composite, references), and a handful of finer correctness toggles.

OptionExampleDescription
strict
// tsconfig.json<br> { "compilerOptions": { "strict": true } }
Enables a bundle of strict type-checking flags — the recommended baseline for new projects.
strictNullChecks
// tsconfig.json<br> { "compilerOptions": { "strictNullChecks": true } }
Treats null/undefined as distinct types requiring explicit handling.
noImplicitAny
// tsconfig.json<br> { "compilerOptions": { "noImplicitAny": true } }
Errors when the compiler would infer any due to missing type information.
target
// tsconfig.json<br> { "compilerOptions": { "target": "ES2022" } }
Sets the emitted JS language level and enables corresponding downlevel transforms.
lib
// tsconfig.json<br> { "compilerOptions": { "lib": ["ES2022", "DOM"] } }
Selects built-in declaration libraries available (e.g., DOM, ES2022).
skipLibCheck
// tsconfig.json<br> { "compilerOptions": { "skipLibCheck": true } }
• Skips type checking of all .d.ts files
• improves build speed and avoids third-party type conflicts.
resolveJsonModule
// tsconfig.json<br> { "compilerOptions": { "resolveJsonModule": true } }
Allows importing .json files with full type inference from their content.
isolatedModules
// tsconfig.json<br> { "compilerOptions": { "isolatedModules": true } }
Errors on patterns that require cross-file type information, making single-file transpile tools safe (e.g., esbuild, SWC).
declaration
// tsconfig.json<br> { "compilerOptions": { "declaration": true } }
Emits .d.ts declaration files describing the public types of each module.
noEmit
// tsconfig.json<br> { "compilerOptions": { "noEmit": true } }
Runs type checking only without writing any output files.
incremental
// tsconfig.json<br> { "compilerOptions": { "incremental": true } }
Saves build info to a .tsbuildinfo file to speed up subsequent compilations.
composite
// tsconfig.json<br> { "compilerOptions": { "composite": true } }
Makes a project reference-able in a project references graph and enables build outputs.
references
// tsconfig.json<br> { "references": [{ "path": "../core" }] }
Declares dependencies between TS projects for tsc -b incremental builds.
exactOptionalPropertyTypes
// tsconfig.json<br> { "compilerOptions": { "exactOptionalPropertyTypes": true } }
Makes optional properties more exact: setting undefined explicitly is distinct from the property being absent.
useUnknownInCatchVariables
// tsconfig.json<br> { "compilerOptions": { "useUnknownInCatchVariables": true } }
Types catch (e) as unknown instead of any for safer error handling.
isolatedDeclarations
// tsconfig.json<br> { "compilerOptions": { "isolatedDeclarations": true } }
Requires sufficient type annotations on exports so other tools can generate .d.ts files without full type analysis (TS 5.5+).
erasableSyntaxOnly
// tsconfig.json<br> { "compilerOptions": { "erasableSyntaxOnly": true } }
Prohibits TS-specific runtime syntax (enums, namespaces, parameter properties) that cannot be stripped by Node.js type-stripping (TS 5.8+).

Table 13: tsc CLI Workflows

The handful of tsc invocations that cover almost everything you'll do from the command line. tsc --noEmit is the one CI pipelines lean on — type-check without producing any JavaScript — while --watch keeps recompiling as you edit and tsc --init scaffolds a fresh config. The -b build mode is the one to know once a codebase grows into multiple referenced projects, since it rebuilds them in dependency order.

CommandExampleDescription
Compile current project
tsc
Compiles using the nearest tsconfig.json in the directory tree.
Type-check only
tsc --noEmit
Runs the type checker without producing any JavaScript output.
Watch mode
tsc --watch
Recompiles on file changes continuously.
Initialize project
tsc --init
Creates a tsconfig.json scaffold with annotated options.
Compile by project file
tsc -p tsconfig.json
Compiles using an explicit configuration file path.
Build mode (project refs)
tsc -b
Builds a referenced project graph in dependency order.
Build with watch
tsc -b --watch
Incrementally rebuilds a project reference graph on changes.
Show TypeScript version
tsc --version
Prints the installed TypeScript version to stdout.

Table 14: Declaration Files & Augmentation

Declaration files (.d.ts) carry types without any runtime code — they're how plain JavaScript packages describe their shapes and how you fill gaps in third-party types. Augmentation is the powerful part: declare global and module augmentation let you add members to existing types (a userId on Express's Request, say) without forking the original package, and declaration merging is the underlying mechanism that makes it work.

PatternExampleDescription
Declaration file (.d.ts)
// index.d.ts<br> export interface User { id: string }
Provides type information for JS at compile time with no runtime code.
Global .d.ts
// globals.d.ts<br> declare const VERSION: string
Declares globals accessible without imports (ambient global library style).
Module .d.ts
// index.d.ts<br> declare module "pkg" { export function f(): void }
Declares the shape of an importable module for untyped JS packages.
declare global
declare global { interface Window { appVersion: string } }
Augments global types from within a module (requires at least one import or export).
Module augmentation
declare module "express" { interface Request { userId?: string } }
Adds members to an existing module's declarations without forking the types package.
Declaration merging
interface Box { size: number }
interface Box { color: string }
Multiple declarations with the same name are merged into one combined type.
Triple-slash reference (types)
/// <reference types="node" />
• Declares a type package dependency for the file
• use import type in modules instead.
Triple-slash reference (lib)
/// <reference lib="dom" />
Explicitly includes a built-in lib (e.g., dom) for the file without changing tsconfig.json.

Table 15: Explicit Resource Management

A newer TypeScript 5.2 feature that brings deterministic cleanup to JavaScript — think of it as try/finally you don't have to write by hand. Declare a resource with using (or await using for async) and its [Symbol.dispose] method runs automatically when the scope exits, so connections and file handles close even on an early return or thrown error. The Disposable interface defines what makes a class eligible, and DisposableStack groups several resources to tear down together in reverse order.

FeatureExampleDescription
using declaration
using conn = getConnection()
Automatically calls conn[Symbol.dispose]() when the enclosing scope exits (TS 5.2+, ECMAScript Stage 4).
await using declaration
await using conn = await openConnection()
Automatically calls conn[Symbol.asyncDispose]() when the enclosing async scope exits.
Symbol.dispose
class Conn { [Symbol.dispose]() { this.close() } }
• The synchronous cleanup method called by using
• implement to make a class disposable.
Symbol.asyncDispose
class Conn { async [Symbol.asyncDispose]() { await this.close() } }
The asynchronous cleanup method called by await using.
Disposable interface
function use(r: Disposable) { using _ = r; }
• Interface requiring [Symbol.dispose]()
• available in lib: "ES2026" or "esnext.disposable".
AsyncDisposable interface
async function use(r: AsyncDisposable) { await using _ = r; }
Interface requiring [Symbol.asyncDispose]().
DisposableStack
using stack = new DisposableStack()
stack.use(resource); stack.defer(() => cleanup())
• Aggregates multiple resources for disposal in LIFO order
• AsyncDisposableStack for async variants.
Back to Programming Languages
Next Topic: WebAssembly (Wasm) Cheat Sheet

More in Programming Languages

  • Type Systems and Generics Across Programming Languages Cheat Sheet
  • WebAssembly (Wasm) Cheat Sheet
  • Arrays & Strings Cheat Sheet
  • Java Cheat Sheet
  • Object-Oriented Programming (OOP) Cheat Sheet
  • Rust Cheat Sheet
View all 31 topics in Programming Languages

References

Official Documentation

  1. TypeScript: JavaScript With Syntax For Types - https://www.typescriptlang.org/
  2. The TypeScript Handbook (Intro) - https://www.typescriptlang.org/docs/handbook/intro.html
  3. Everyday Types (Handbook) - https://www.typescriptlang.org/docs/handbook/2/everyday-types.html
  4. Object Types (Handbook) - https://www.typescriptlang.org/docs/handbook/2/objects.html
  5. Interfaces (Handbook) - https://www.typescriptlang.org/docs/handbook/interfaces.html
  6. Type Narrowing (Handbook) - https://www.typescriptlang.org/docs/handbook/2/narrowing.html
  7. More on Functions (Handbook) - https://www.typescriptlang.org/docs/handbook/2/functions.html
  8. Generics (Handbook) - https://www.typescriptlang.org/docs/handbook/2/generics.html
  9. Classes (Handbook v2) - https://www.typescriptlang.org/docs/handbook/2/classes.html
  10. Classes (Legacy Handbook) - https://www.typescriptlang.org/docs/handbook/classes.html
  11. Unions and Intersections (Handbook) - https://www.typescriptlang.org/docs/handbook/unions-and-intersections.html
  12. Literal Types (Handbook) - https://www.typescriptlang.org/docs/handbook/literal-types.html
  13. Enums (Handbook) - https://www.typescriptlang.org/docs/handbook/enums.html
  14. Keyof Type Operator (Handbook) - https://www.typescriptlang.org/docs/handbook/2/keyof-types.html
  15. Typeof Type Operator (Handbook) - https://www.typescriptlang.org/docs/handbook/2/typeof-types.html
  16. Indexed Access Types (Handbook) - https://www.typescriptlang.org/docs/handbook/2/indexed-access-types.html
  17. Conditional Types (Handbook) - https://www.typescriptlang.org/docs/handbook/2/conditional-types.html
  18. Mapped Types (Handbook) - https://www.typescriptlang.org/docs/handbook/2/mapped-types.html
  19. Template Literal Types (Handbook) - https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html
  20. Utility Types (Handbook) - https://www.typescriptlang.org/docs/handbook/utility-types.html
  21. Modules Reference (Handbook) - https://www.typescriptlang.org/docs/handbook/modules/reference.html
  22. ESM/CJS Interoperability (Handbook) - https://www.typescriptlang.org/docs/handbook/modules/appendices/esm-cjs-interop.html
  23. Choosing Compiler Options (Modules guide) - https://www.typescriptlang.org/docs/handbook/modules/guides/choosing-compiler-options.html
  24. JSX (Handbook) - https://www.typescriptlang.org/docs/handbook/jsx.html
  25. Decorators (Handbook) - https://www.typescriptlang.org/docs/handbook/decorators.html
  26. Triple-slash Directives (Handbook) - https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html
  27. Module Resolution (Handbook) - https://www.typescriptlang.org/docs/handbook/module-resolution.html
  28. Project References (Handbook) - https://www.typescriptlang.org/docs/handbook/project-references.html
  29. Declaration Files: By Example - https://www.typescriptlang.org/docs/handbook/declaration-files/by-example.html
  30. Declaration Files Template: Global .d.ts - https://www.typescriptlang.org/docs/handbook/declaration-files/templates/global-d-ts.html
  31. Declaration Files Template: Module .d.ts - https://www.typescriptlang.org/docs/handbook/declaration-files/templates/module-d-ts.html
  32. Declaration Merging (Handbook) - https://www.typescriptlang.org/docs/handbook/declaration-merging.html
  33. Namespaces (Handbook) - https://www.typescriptlang.org/docs/handbook/namespaces.html
  34. Type Checking JavaScript Files (Handbook) - https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html
  35. Advanced Types (Legacy Handbook) - https://www.typescriptlang.org/docs/handbook/advanced-types.html
  36. tsc CLI Options (Handbook) - https://www.typescriptlang.org/docs/handbook/compiler-options.html
  37. TSConfig Reference (Index) - https://www.typescriptlang.org/tsconfig/
  38. TSConfig: strict - https://www.typescriptlang.org/tsconfig/strict.html
  39. TSConfig: strictNullChecks - https://www.typescriptlang.org/tsconfig/strictNullChecks.html
  40. TSConfig: noImplicitAny - https://www.typescriptlang.org/tsconfig/noImplicitAny.html
  41. TSConfig: noImplicitOverride - https://www.typescriptlang.org/tsconfig/noImplicitOverride.html
  42. TSConfig: exactOptionalPropertyTypes - https://www.typescriptlang.org/tsconfig/exactOptionalPropertyTypes.html
  43. TSConfig: useUnknownInCatchVariables - https://www.typescriptlang.org/tsconfig/useUnknownInCatchVariables.html
  44. TSConfig: target - https://www.typescriptlang.org/tsconfig/target.html
  45. TSConfig: lib - https://www.typescriptlang.org/tsconfig/lib.html
  46. TSConfig: module - https://www.typescriptlang.org/tsconfig/module.html
  47. TSConfig: moduleResolution - https://www.typescriptlang.org/tsconfig/moduleResolution.html
  48. TSConfig: jsxImportSource - https://www.typescriptlang.org/tsconfig/jsxImportSource.html
  49. TSConfig: verbatimModuleSyntax - https://www.typescriptlang.org/tsconfig/verbatimModuleSyntax.html
  50. TSConfig: esModuleInterop - https://www.typescriptlang.org/tsconfig/esModuleInterop.html
  51. TSConfig: allowSyntheticDefaultImports - https://www.typescriptlang.org/tsconfig/allowSyntheticDefaultImports.html
  52. TSConfig: skipLibCheck - https://www.typescriptlang.org/tsconfig/skipLibCheck.html
  53. TSConfig: resolveJsonModule - https://www.typescriptlang.org/tsconfig/resolveJsonModule.html
  54. TSConfig: isolatedModules - https://www.typescriptlang.org/tsconfig/isolatedModules.html
  55. TSConfig: isolatedDeclarations - https://www.typescriptlang.org/tsconfig/isolatedDeclarations.html
  56. TSConfig: composite - https://www.typescriptlang.org/tsconfig/composite.html
  57. TSConfig: declaration - https://www.typescriptlang.org/tsconfig/declaration.html
  58. TSConfig: noEmit - https://www.typescriptlang.org/tsconfig/noEmit.html
  59. TSConfig: incremental - https://www.typescriptlang.org/tsconfig/incremental.html
  60. TSConfig: experimentalDecorators - https://www.typescriptlang.org/tsconfig/experimentalDecorators.html
  61. Recursive Type References (TypeScript Playground example) - https://www.typescriptlang.org/play/3-7/types-and-code-flow/recursive-type-references.ts.html
  62. Import attributes — MDN Web Docs - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import/with
  63. Static initialization blocks — MDN Web Docs - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Static_initialization_blocks

Release Notes (TypeScript)

  1. TypeScript 2.0 Release Notes - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-0.html
  2. TypeScript 2.8 Release Notes - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html
  3. TypeScript 3.4 Release Notes - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html
  4. TypeScript 3.7 Release Notes - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html
  5. TypeScript 4.1 Release Notes - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-1.html
  6. TypeScript 4.3 Release Notes - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-3.html
  7. TypeScript 4.4 Release Notes - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-4.html
  8. TypeScript 4.7 Release Notes - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-7.html
  9. TypeScript 4.9 Release Notes - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html
  10. TypeScript 5.0 Release Notes - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html
  11. TypeScript 5.2 Release Notes - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html
  12. TypeScript 5.3 Release Notes - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-3.html
  13. TypeScript 5.4 Release Notes - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-4.html
  14. TypeScript 5.5 Release Notes - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-5.html
  15. TypeScript 5.7 Release Notes - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-7.html
  16. TypeScript 5.8 Release Notes - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-8.html

Microsoft & TypeScript Team Blogs

  1. Announcing TypeScript 4.9 - https://devblogs.microsoft.com/typescript/announcing-typescript-4-9/
  2. Announcing TypeScript 5.0 - https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/
  3. Announcing TypeScript 5.2 Beta - https://devblogs.microsoft.com/typescript/announcing-typescript-5-2-beta/
  4. Announcing TypeScript 5.4 - https://devblogs.microsoft.com/typescript/announcing-typescript-5-4/
  5. Announcing TypeScript 5.5 - https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/
  6. Announcing TypeScript 5.8 - https://devblogs.microsoft.com/typescript/announcing-typescript-5-8/

Technical Blogs & Tutorials

  1. Types vs. interfaces in TypeScript (LogRocket) - https://blog.logrocket.com/types-vs-interfaces-typescript/
  2. How to use type guards in TypeScript (LogRocket) - https://blog.logrocket.com/how-to-use-type-guards-typescript/
  3. Guide to conditional types in TypeScript (LogRocket) - https://blog.logrocket.com/guide-conditional-types-typescript/
  4. Using built-in utility types in TypeScript (LogRocket) - https://blog.logrocket.com/using-built-in-utility-types-typescript/
  5. Implementing function overloading in TypeScript (LogRocket) - https://blog.logrocket.com/implementing-function-overloading-typescript/
  6. A complete guide to const assertions in TypeScript (LogRocket) - https://blog.logrocket.com/complete-guide-const-assertions-typescript/
  7. Understanding the exclamation mark (non-null assertion) in TypeScript (LogRocket) - https://blog.logrocket.com/understanding-exclamation-mark-typescript/
  8. TypeScript enums: Usage, advantages, and best practices (LogRocket) - https://blog.logrocket.com/typescript-enum/
  9. How to use the keyof operator in TypeScript (LogRocket) - https://blog.logrocket.com/how-to-use-keyof-operator-typescript/
  10. Assertion functions in TypeScript (LogRocket) - https://blog.logrocket.com/assertion-functions-typescript/
  11. TypeScript discriminated union and intersection types (LogRocket) - https://blog.logrocket.com/understanding-discriminated-union-intersection-types-typescript/
  12. A practical guide to TypeScript decorators (LogRocket) - https://blog.logrocket.com/practical-guide-typescript-decorators/
  13. Resource management in TypeScript with the using keyword (LogRocket) - https://blog.logrocket.com/resource-management-typescript-using-keyword/
  14. How to use import attributes in TypeScript and JavaScript (LogRocket) - https://blog.logrocket.com/import-attributes-typescript-javascript/
  15. TypeScript project references (LogRocket) - https://blog.logrocket.com/boost-your-productivity-with-typescript-project-references/
  16. TypeScript Utility Types Guide (Cam McHenry) - https://camchenry.com/blog/typescript-utility-types
  17. TypeScript Utility Types You Need to Know (Builder.io) - https://www.builder.io/blog/utility-types
  18. Better Configuration in TypeScript with the satisfies Operator (Builder.io) - https://www.builder.io/blog/satisfies-operator
  19. Index Signatures in TypeScript (Dmitri Pavlutin) - https://dmitripavlutin.com/typescript-index-signatures/
  20. Covariance and Contravariance in TypeScript (Dmitri Pavlutin) - https://dmitripavlutin.com/typescript-covariance-contravariance/
  21. NoInfer: TypeScript 5.4's New Utility Type (Total TypeScript) - https://www.totaltypescript.com/noinfer
  22. Type Predicate Inference: The TS 5.5 Feature (Total TypeScript) - https://www.totaltypescript.com/type-predicate-inference
  23. TypeScript 5.0 Beta Deep Dive (Total TypeScript) - https://www.totaltypescript.com/tips/typescript-5-0-beta-deep-dive
  24. The moduleResolution Option in tsconfig.json (Total TypeScript) - https://www.totaltypescript.com/workshops/typescript-pro-essentials/configuring-typescript/the-moduleresolution-option-in-tsconfigjson
  25. TypeScript 5.5: A Blockbuster Release (Effective TypeScript) - https://effectivetypescript.com/2024/07/02/ts-55/
  26. The Making of a TypeScript Feature: Inferring Type Predicates (Effective TypeScript) - https://effectivetypescript.com/2024/04/16/inferring-a-type-predicate/
  27. TypeScript Index Signatures (Better Stack) - https://betterstack.com/community/guides/scaling-nodejs/typescript-index-signatures/
  28. TypeScript Enums (Better Stack) - https://betterstack.com/community/guides/scaling-nodejs/typescript-enums/
  29. Mapped Types in TypeScript (Better Stack) - https://betterstack.com/community/guides/scaling-nodejs/mapped-types/
  30. verbatimModuleSyntax Explained (Better Stack) - https://betterstack.com/community/guides/scaling-nodejs/ts-verbatimmodulesyntax/
  31. Understanding TypeScript Type Guards (Better Stack) - https://betterstack.com/community/guides/scaling-nodejs/typescript-type-guards/
  32. Understanding TypeScript Type Assertions (Better Stack) - https://betterstack.com/community/guides/scaling-nodejs/type-assertions/
  33. The --strict Compiler Option in TypeScript (Marius Schulz) - https://mariusschulz.com/blog/the-strict-compiler-option-in-typescript
  34. Conditional Types in TypeScript (Marius Schulz) - https://mariusschulz.com/blog/conditional-types-in-typescript
  35. Assertion Functions in TypeScript (Marius Schulz) - https://mariusschulz.com/blog/assertion-functions-in-typescript
  36. String Manipulation Types in TypeScript 4.x (DEV) - https://dev.to/43081j/string-manipulation-types-in-typescript-4-x-556e
  37. TypeScript 4.9: satisfies operator (DEV) - https://dev.to/ayc0/typescript-49-satisfies-operator-1e4i
  38. TypeScript Stage 3 Decorators: A Journey (DEV) - https://dev.to/baliachbryan/typescript-stage-3-decorators-a-journey-through-setup-and-usage-5f00
  39. Advanced Type Features in TypeScript 5.x (DEV) - https://dev.to/serifcolakel/advanced-type-features-in-typescript-5x-conditional-mapped-and-utility-types-1p5
  40. Introducing TypeScript override keyword (DEV) - https://dev.to/lioness100/introducing-typescript-override-keyword-4b36
  41. Node.js, TypeScript and ESM (DEV) - https://dev.to/a0viedo/nodejs-typescript-and-esm-it-doesnt-have-to-be-painful-438e
  42. Unlocking Type Safety: Type Guards in TypeScript (DEV) - https://dev.to/vjnvisakh/unlocking-type-safety-a-deep-dive-into-type-guards-in-typescript-46kn
  43. How to overload functions in TypeScript (DEV) - https://dev.to/zirkelc/how-to-overload-functions-in-typescript-22c3
  44. Mastering Enums in TypeScript (DEV) - https://dev.to/vjnvisakh/mastering-enums-in-typescript-a-comprehensive-guide-4945
  45. The power of const assertions (Dominik D. / tkdodo.eu) - https://tkdodo.eu/blog/the-power-of-const-assertions
  46. TypeScript as assertion vs satisfies operator guide (Medium) - https://medium.com/@mohsentaleb/typescript-as-assertion-vs-satisfies-operator-complete-guide-with-examples-11af314cadfb
  47. Writing Recursive Types That TypeScript Accepts (Medium) - https://medium.com/@AlexanderObregon/writing-recursive-types-that-typescript-accepts-8e805f206c78
  48. How to Use TypeScript Template Literal Types Like a Pro (Medium) - https://medium.com/javascript-in-plain-english/how-to-use-typescript-template-literal-types-like-a-pro-2e02a7db0bac
  49. Working with Function Overloads in TypeScript (Medium) - https://medium.com/@AlexanderObregon/working-with-function-overloads-in-typescript-1a2e21d2325f
  50. TypeScript Mapped Types Explained (Medium) - https://medium.com/@AlexanderObregon/writing-mapped-types-in-typescript-without-getting-in-your-own-way-07590a1226d1
  51. What Happens When You Use Generics in TypeScript Functions (Medium) - https://medium.com/@AlexanderObregon/what-happens-when-you-use-generics-in-typescript-functions-df5c23085da0
  52. tsconfig.json demystified (Medium) - https://medium.com/extra-credit-by-guild/tsconfig-json-demystified-d8f333e578c1
  53. ECMAScript explicit resource management in TypeScript 5.2 (Medium) - https://medium.com/@bagherani/ecmascript-explicit-resource-management-early-implementation-in-typescript-5-2-5e4d08b2aee3
  54. TypeScript 5.0 — The New Features (Medium) - https://medium.com/rewrite-tech/typescript-5-0-the-new-features-and-the-issues-they-solve-49757530e760
  55. A note on TypeScript non-null assertion operator (Medium) - https://medium.com/@tar.viturawong/a-note-on-typescript-non-null-assertion-operator-bad8fbe62bba
  56. Type Narrowing in TypeScript (Medium) - https://medium.com/@dewandameena1098/type-narrowing-in-typescript-a-simple-guide-1e5bcb6a1319
  57. Explicit Resource Management with TypeScript and Postgres (blog.r0b.io) - https://blog.r0b.io/post/using-explicit-resource-management-with-typescript-and-postgres/
  58. TypeScript Isolated Declarations: Speeding up the ecosystem (marvinh.dev) - https://marvinh.dev/blog/speeding-up-javascript-ecosystem-part-10/
  59. Node's new built-in support for TypeScript (2ality) - https://2ality.com/2025/01/nodejs-strip-type.html
  60. ECMAScript feature: import attributes (2ality) - https://2ality.com/2025/01/import-attributes.html
  61. Template literal types in TypeScript (2ality) - https://2ality.com/2025/01/template-literal-types.html
  62. TypeScript 5.7 & 5.8 Features (javascript-conference.com) - https://javascript-conference.com/blog/typescript-5-7-5-8-features-ecmascript-direct-execution/
  63. TypeScript 5.0: const modifier on type parameters (Xebia) - https://xebia.com/blog/typescript-5-0-and-the-new-const-modifier-on-type-parameters/
  64. TypeScript Decorators (Refine) - https://refine.dev/blog/typescript-decorators/
  65. Using TypeScript Decorators in Practice (Bits and Pieces) - https://blog.bitsrc.io/using-typescript-decorators-in-practise-d09cc1c0f8f4
  66. Dev 101: TypeScript 5.0+ Decorators (Unstacked Newsletter) - https://newsletter.unstacked.dev/p/dev-101-typescript-50-decorators
  67. Covariant, Contravariant, and Invariant in TypeScript (sandromaglione.com) - https://www.sandromaglione.com/articles/covariant-contravariant-and-invariant-in-typescript
  68. How to Create Variance Annotations in TypeScript (OneUptime Blog) - https://oneuptime.com/blog/post/typescript-variance-annotations/view
  69. How to benefit from const assertion in TypeScript (Kontent.ai) - https://kontent.ai/blog/how-to-benefit-from-const-assertion-in-your-typescript-code/
  70. How to Use TypeScript Satisfies Operator (Tao of React) - https://www.taoreact.com/typescript-satisfies/
  71. TypeScript Cheatsheet (Joshua's Docs) - https://docs.joshuatz.com/cheatsheets/typescript/
  72. typescript-eslint: consistent-type-imports rule - https://typescript-eslint.io/rules/consistent-type-imports
  73. typescript-eslint: consistent-type-assertions rule - https://typescript-eslint.io/rules/consistent-type-assertions/

GitHub Repositories, Issues & Discussions

  1. microsoft/TypeScript — main repository - https://github.com/microsoft/TypeScript
  2. TypeScript-Handbook source - https://github.com/microsoft/TypeScript-Handbook
  3. TypeScript issue: Import Attributes Stage 3 support - https://github.com/microsoft/TypeScript/issues/53656
  4. TypeScript issue: Variance annotation (in/out) - https://github.com/microsoft/TypeScript/issues/10717
  5. TypeScript issue: Isolated Declarations — state of the feature - https://github.com/microsoft/TypeScript/issues/58944
  6. TypeScript issue: Circular recursive types in conditional/mapped type world - https://github.com/microsoft/TypeScript/issues/23400
  7. TypeScript issue: Non-null assertion operator documentation - https://github.com/microsoft/TypeScript/issues/11494
  8. TypeScript issue: esModuleInterop / allowSyntheticDefaultImports clarification - https://github.com/microsoft/TypeScript/issues/62529
  9. ts-essentials: Essential TypeScript utility types - https://github.com/ts-essentials/ts-essentials
  10. type-fest: A collection of essential TypeScript types (Sindre Sorhus) - https://github.com/sindresorhus/type-fest
  11. ts-toolbelt: Higher type safety in TypeScript - https://github.com/millsp/ts-toolbelt
  12. next.js discussion: Support TypeScript satisfies operator - https://github.com/vercel/next.js/discussions/40895
  13. SvelteKit issue: moduleResolution bundler/node16/nodenext - https://github.com/sveltejs/kit/issues/9007
  14. esbuild: TypeScript project reference incremental build discussion - https://github.com/evanw/esbuild/issues/1250
  15. TC39 proposal: Explicit Resource Management (using/await using) - https://github.com/tc39/proposal-explicit-resource-management
  16. TC39 proposal: Import Attributes - https://github.com/tc39/proposal-import-attributes
  17. TC39 proposal: Stage 3 Decorators - https://github.com/tc39/proposal-decorators

Community Q&A (Stack Overflow)

  1. TypeScript function overloading — Stack Overflow - https://stackoverflow.com/questions/13212625/typescript-function-overloading
  2. Understanding target and module in tsconfig — Stack Overflow - https://stackoverflow.com/questions/41993811/understanding-target-and-module-in-tsconfig
  3. Do I need allowSyntheticDefaultImports if esModuleInterop is true? — Stack Overflow - https://stackoverflow.com/questions/52576203/do-i-ever-need-explicit-allowsyntheticdefaultimports-if-esmoduleinterop-is-true
  4. What does "as const" mean in TypeScript? — Stack Overflow - https://stackoverflow.com/questions/66993264/what-does-the-as-const-mean-in-typescript-and-what-is-its-use-case
  5. Can anyone clarify the TypeScript handbook explanation for keyof? — Stack Overflow - https://stackoverflow.com/questions/69450452/can-anyone-clarify-this-typescript-handbook-explanation-for-keyof-please
  6. Rules for the use of angle brackets in TypeScript — Stack Overflow - https://stackoverflow.com/questions/37358364/rules-for-the-use-of-angle-brackets-in-typescript
  7. Difference between type and interface in TypeScript — Stack Overflow - https://stackoverflow.com/questions/37233735/interfaces-vs-types-in-typescript
  8. TypeScript: difference between unknown and any — Stack Overflow - https://stackoverflow.com/questions/51439843/unknown-vs-any-in-typescript
  9. When to use never and unknown in TypeScript — Stack Overflow - https://stackoverflow.com/questions/51439843/unknown-vs-any-in-typescript
  10. How does infer work in TypeScript? — Stack Overflow - https://stackoverflow.com/questions/60067100/why-is-the-infer-keyword-needed-in-typescript

Video Resources

  1. TypeScript Full Course for Beginners (freeCodeCamp — YouTube) - https://www.youtube.com/watch?v=30LWjhZzg50
  2. TypeScript Course for Beginners — Learn TypeScript from Scratch (Academind — YouTube) - https://www.youtube.com/watch?v=BwuLxPH8IDs
  3. You are a Junior Dev if You Don't Know These 18 TypeScript Utility Types (YouTube) - https://www.youtube.com/watch?v=BhNSauna0eo
  4. TypeScript 5.0 BETA IS HERE (YouTube) - https://www.youtube.com/watch?v=iOTAFRFgm8I
  5. 5 NEW Features in TypeScript 5.5 (YouTube) - https://www.youtube.com/watch?v=0iX4SK-jbhE
  6. Inferred Type Predicates: TypeScript 5.5's Top New Feature (YouTube) - https://www.youtube.com/watch?v=LTuzl2r2HjA
  7. TypeScript 5.2 — using Declarations and Explicit Resource Management (YouTube) - https://www.youtube.com/watch?v=kDmpuiGZkLI
  8. TypeScript Got a New Utility Type — NoInfer (YouTube) - https://www.youtube.com/watch?v=O6VbrLR6ro8
  9. Disposable in TypeScript: Explicit Resource Management (YouTube) - https://www.youtube.com/watch?v=ytptTeBr0I8