A base TSConfig for working with Node 14.
84
A small utility script that generates TypeScript configuration files for React-based projects.
"next" as a dependency, the function identifies the framework as "next.js" @test"vite" and "react" as dependencies, the function identifies the framework as "vite-react" @test"react-native" as a dependency, the function identifies the framework as "react-native" @test"baseUrl" or "outDir") @test@generates
export interface PackageJson {
dependencies?: Record<string, string>;
devDependencies?: Record<string, string>;
}
export interface TsConfigOptions {
compilerOptions?: Record<string, any>;
}
/**
* Detects the React framework type from a package.json file.
* Returns one of: "next.js", "vite-react", "react-native", or "unknown"
*/
export function detectFramework(packageJson: PackageJson): string;
/**
* Generates a TypeScript configuration object for the detected framework.
* The configuration extends the appropriate @tsconfig base and includes custom options.
*/
export function generateTsConfig(
framework: string,
customOptions?: TsConfigOptions
): object;Provides base TypeScript configuration for Vite React projects.
Provides base TypeScript configuration for Next.js projects.
Provides base TypeScript configuration for React Native projects.
Install with Tessl CLI
npx tessl i tessl/npm-tsconfig--node14docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10