CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-tsconfig--node14

A base TSConfig for working with Node 14.

84

1.05x
Overview
Eval results
Files

task.mdevals/scenario-4/

TypeScript Configuration Helper

Build a utility that helps developers set up TypeScript projects by generating appropriate tsconfig.json files with helpful documentation comments and metadata.

Requirements

Create a TypeScript module that generates well-documented TypeScript configuration files for different target environments.

Your solution should:

  1. Generate a tsconfig.json file that extends an appropriate base configuration for a given environment (e.g., Node.js version)
  2. Include inline comments that reference official documentation URLs
  3. Add custom metadata fields to help developers understand the configuration
  4. Support multiple environments: Node.js LTS, modern Node versions, and strict typing
  5. Validate that the generated configuration includes proper schema references for IDE support

Test Cases

  • When generating config for "node-lts", it extends the correct base package and includes the schema field @test
  • When generating config for "strictest", it extends the strictest base and adds a comment about strict type checking @test
  • When generating config with documentation enabled, it includes comments with official TypeScript documentation URLs @test
  • When generating config for an unknown environment, it returns an error @test

Implementation

@generates

API

/**
 * Configuration options for generating a tsconfig
 */
export interface GenerateOptions {
  environment: 'node-lts' | 'node22' | 'strictest' | 'recommended';
  includeDocs?: boolean;
  addMetadata?: boolean;
}

/**
 * Generated TypeScript configuration result
 */
export interface GeneratedConfig {
  config: object;
  comments?: string[];
  metadata?: {
    display: string;
    docs?: string[];
  };
}

/**
 * Generates a TypeScript configuration for the specified environment
 * @param options - Configuration generation options
 * @returns Generated configuration with optional documentation
 */
export function generateTsConfig(options: GenerateOptions): GeneratedConfig;

/**
 * Validates that a configuration properly extends a base config
 * @param config - The configuration to validate
 * @returns True if valid, false otherwise
 */
export function validateConfig(config: object): boolean;

Dependencies { .dependencies }

@tsconfig/bases { .dependency }

Provides standardized TypeScript configuration bases with metadata and documentation.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/npm-tsconfig--node14

tile.json