Typescript — Ship Fast ⚡️
This template comes with Typescript support out of the box. You can use it in your pages, components, API routes, and even in your config file.
Defining types
You can define types in the types/
folder. For example types/FAQ.ts
with:
import type { JSX } from 'react'; export interface FAQItem { question: string; answer: JSX.Element; }Then import it at
type/index.ts
as:export * from './FAQ';And use it in your components as:
import type { FAQItem } from '@/types';