Glossary
What is TypeScript?
In depth
TypeScript was released in 2012 by Anders Hejlsberg (C# creator) at Microsoft. Philosophy: gradual adoption — convert a JavaScript file to .ts, add type annotations gradually, the compiler catches errors before deploy.
Ready type system: (1) **Primitives** — string, number, boolean, undefined, null. (2) **Composite** — array, tuple, object, function. (3) **Union** — A | B (multiple options). (4) **Intersection** — A & B (combined). (5) **Generics** — <T> reusable types. (6) **Utility types** — Partial<T>, Required<T>, Pick<T, K>, Omit, ReturnType, Parameters. (7) **Mapped types** — { [K in keyof T]: ... }. (8) **Conditional types** — T extends U ? X : Y. (9) **Template literal types** — `${string}-${number}`.
Real-world wins: (1) **Compile-time errors** save 30-50% debug time. (2) **IDE autocomplete** — IntelliSense across imports. (3) **Refactoring confidence** — rename works correctly across codebase. (4) **API contract enforcement** — Zod schema → TypeScript type generation. (5) **Self-documenting** — types replace half of JSDoc.
Learning curve: (1) Beginners — 1-2 weeks adoption. (2) Mid-level — 2-4 weeks comfortable. (3) Advanced — 6-12 months mastery (conditional types, infer, recursive types).
Craftwebstudio strategy: TypeScript strict mode default 2024-2026. New project skeleton: tsconfig "strict": true. Migration JavaScript → TypeScript: 1-4 weeks medium codebase. Tools: tsc, ESLint @typescript-eslint, Prettier, Zod (runtime validation), tRPC (type-safe API), Drizzle (type-safe ORM).
Examples
- 1Type inference: const x = 5 → typeof x === number, no annotation needed
- 2Zod runtime validation + TypeScript type: z.infer<typeof schema> → both
- 3Discriminated union: type Result = { ok: true, data: T } | { ok: false, error: E }
- 4Generic component: <Card<T>>({ items }: Props<T>) → reusable type-safe
- 5Strict mode tsconfig: "strict": true, "noUncheckedIndexedAccess": true → catches 90% of bugs
Related terms
JavaScript
JavaScript is the main programming language of the web browser, used to add interactivity to pages. It runs on both the …
React
React is a JavaScript library for building UIs — released by Facebook in 2013. Today the largest front-end library — 40%…
Next.js
Next.js is a React-based full-stack framework covering server-side rendering, static generation, file-based routing, edg…
Related services
Frequently asked questions
Is TypeScript slower than JavaScript?▾
Runtime is the same — TypeScript compiles down to JavaScript. Compile time is +5-15%, but debug time is -30-50%. Net win.
Is TypeScript worth trying on small projects?▾
Single-file script — no (overhead). 5+ files OR a team — yes (catches typos, refactor confidence, IDE autocomplete). 2026 industry standard — TypeScript-first.
Does TypeScript do runtime checking?▾
No — only compile-time. Runtime validation: Zod, Yup, io-ts, ArkType. Pattern: Zod schema → z.infer<>-derived TypeScript type → tsc + Zod gives double protection.
Ready for a free consultation?
Get in touch — we reply within 24 hours with a scoped project estimate.