Set up a monorepo for [apps and packages, e.g. web app, API and shared UI library] using [tool, e.g. pnpm workspaces / Turborepo / Nx]. Show the folder structure, config files, shared TypeScript config, build and test scripts, and CI caching.
Results for “typescript”
5 prompts
Write a React custom hook called [useSomething] that [purpose, e.g. fetches data with caching / debounces input / tracks window size]. Use TypeScript, handle cleanup and errors, and include usage examples and tests.
Write a TypeScript client for the [API name] REST API covering [endpoints]. Include typed requests and responses, auth handling, retries with backoff, timeouts, helpful errors, and usage examples.
Act as a senior Next.js developer. Next.js version and router: [e.g. 15, App Router] Page: [purpose] Data source: [API/database] Styling: [Tailwind / CSS modules] Write the page using server components where appropriate, a client component for interactivity, loading and error UI, metadata for SEO, caching/revalidation…
Next.js page with data fetching
Build a Next.js page or route with data fetching, loading and error states and SEO metadata.
Generate TypeScript types from this JSON. JSON sample(s): ```json [paste] ``` Create interfaces with sensible names, mark optional and nullable fields, use union types for known string values, and also create a Zod schema for runtime validation. Note any fields where the sample is ambiguous.
TypeScript types from JSON
Generate accurate TypeScript interfaces and validation schemas from sample JSON.