Plain JavaScript
Discouraged
Not our default choice. Use TypeScript for all new projects.
What is it
Writing JavaScript without static type annotations, relying on runtime behavior and dynamic typing.
Why it's not our default
- TypeScript is the industry standard — adoption at >80% for professional projects; most libraries ship with TypeScript types.
- No compile-time error checking — bugs that TypeScript catches at build time become runtime errors.
- Poor IDE support compared to TS — TypeScript enables autocompletion, refactoring, inline docs, and navigation.
- Harder to maintain at scale — lack of type contracts between modules makes refactoring risky and onboarding slow.
- All Aliz stack tools assume TypeScript — Vite, Vitest, React, Zustand, TanStack Query all have first-class TS support.
When it makes sense
- Quick throwaway scripts — one-off data migrations, local utilities, or short-lived experiments where type annotation overhead outweighs the benefit.
- Prototypes you will delete — if the code won't survive past a sprint, TypeScript setup cost may not be justified.
Alternative
Migration path
- Add TypeScript:
npm install -D typescriptand createtsconfig.json - Rename files incrementally:
.js→.ts,.jsx→.tsx - Start with
"strict": falsein tsconfig, then progressively enable strict checks - Use
// @ts-expect-errororanytemporarily for complex legacy patterns - Add types for dependencies:
npm install -D @types/react @types/nodeetc.