Skip to content

Typescript

Joshua Amaju edited this page Sep 15, 2024 · 2 revisions

Setup

Create tsconfig.json at project level. Then extend the tsconfig provided by stack54 stack54/tsconfigs/base, includes configuration for Node and Svelte.

{
  "extends": "stack54/tsconfigs/base"
}

Then create env.d.ts in your src folder, add the following

/// <reference types="svelte" />
/// <reference types="vite/client" />

then add to your src tsconfig to pick up the declaration

{
  // ...
  "include": ["src"]
}
Clone this wiki locally