Complete TypeScript type definitions for all configuration options, contributors, documentation structure, and workflow versions used throughout the Create TypeScript App system.
Complete configuration interface defining all available options for TypeScript project generation.
/**
* Complete base options interface with optional preset field
* Extends BaseOptionsFor from bingo-stratum with additional CTA-specific options
*/
interface BaseOptions extends BaseOptionsFor<typeof base> {
/** Optional preset name to apply predefined block combinations */
preset?: string;
}The BaseOptions interface includes all configuration properties detailed in the Template System documentation and serves as the primary configuration interface for project generation.
Defines the structure for AllContributors contributor information and recognition.
/**
* AllContributors contributor configuration
* Used for .all-contributorsrc and contributor recognition
*/
interface Contributor {
/** GitHub avatar URL for the contributor */
avatar_url: string;
/** Array of contribution types (code, docs, design, etc.) */
contributions: string[];
/** GitHub username or login */
login: string;
/** Display name of the contributor */
name: string;
/** URL to contributor's profile or website */
profile: string;
}Usage:
import type { Contributor } from "create-typescript-app";
const contributors: Contributor[] = [
{
avatar_url: "https://avatars.githubusercontent.com/u/12345?v=4",
contributions: ["code", "doc", "test"],
login: "github-username",
name: "Jane Developer",
profile: "https://github.com/github-username"
}
];Defines additional documentation content and structure for README and development docs.
/**
* Additional documentation configuration for generated docs
*/
interface Documentation {
/** Additional development documentation content */
development?: string;
/** README.md configuration and content */
readme: Readme;
}
/**
* README.md content configuration
*/
interface Readme {
/** Additional content sections for README */
additional?: string;
/** Explainer section content for project overview */
explainer?: string;
/** Footnotes section for additional information */
footnotes?: string;
/** Usage examples and documentation */
usage?: string;
}Usage:
import type { Documentation } from "create-typescript-app";
const documentation: Documentation = {
development: "## Development Setup\n\nAdditional setup instructions...",
readme: {
explainer: "This library provides advanced data processing capabilities.",
usage: "## Usage\n\n```typescript\nimport { process } from 'my-lib';\n```",
additional: "## Advanced Features\n\nDetailed feature descriptions...",
footnotes: "## Credits\n\nSpecial thanks to contributors..."
}
};Defines GitHub Actions workflow version tracking and pinning configuration.
/**
* Individual workflow version configuration
*/
interface WorkflowVersion {
/** Git hash for the workflow version */
hash?: string;
/** Whether the workflow version is pinned */
pinned?: boolean;
}
/**
* Collection of workflow versions for a specific workflow file
*/
type WorkflowVersions = Record<string, WorkflowVersion>;
/**
* Complete workflow versions configuration mapping workflow names to versions
*/
type WorkflowsVersions = Record<string, WorkflowVersions>;Usage:
import type { WorkflowsVersions } from "create-typescript-app";
const workflowsVersions: WorkflowsVersions = {
"ci.yml": {
"setup-node": {
hash: "v4.0.2",
pinned: true
},
"checkout": {
hash: "v4.1.1",
pinned: false
}
},
"release.yml": {
"setup-node": {
hash: "v4.0.2",
pinned: true
}
}
};Defines email configuration options for different platforms and contact methods.
/**
* Email configuration supporting single email or platform-specific emails
*/
type EmailConfig = string | {
/** GitHub-specific email address */
github: string;
/** npm-specific email address */
npm: string;
};Usage:
// Single email for all platforms
const email1: EmailConfig = "developer@example.com";
// Platform-specific emails
const email2: EmailConfig = {
github: "github@example.com",
npm: "npm@example.com"
};Defines Node.js version requirements and pinning options.
/**
* Node.js engine version configuration
*/
interface NodeConfig {
/** Minimum required Node.js version */
minimum: string;
/** Optional pinned Node.js version for development */
pinned?: string;
}Usage:
const nodeConfig: NodeConfig = {
minimum: "20.19.0",
pinned: "24.3.0"
};Defines logo configuration for README.md display and documentation.
/**
* Logo configuration for README.md display
*/
interface LogoConfig {
/** Alt text for the logo image */
alt: string;
/** Source path to the logo image file */
src: string;
/** Optional height constraint for logo display */
height?: number;
/** Optional width constraint for logo display */
width?: number;
}Usage:
const logo: LogoConfig = {
alt: "My Project Logo",
src: "./assets/logo.png",
height: 80,
width: 200
};Defines contribution guide link configuration for development documentation.
/**
* Contribution guide link configuration
*/
interface GuideConfig {
/** URL to the contribution guide */
href: string;
/** Display title for the guide link */
title: string;
}Usage:
const guide: GuideConfig = {
href: "https://contribute.design/my-org/my-project",
title: "Contribution Guide"
};Defines existing GitHub repository label configuration for issue management.
/**
* GitHub repository label configuration
*/
interface GitHubLabel {
/** Hex color code for the label */
color: string;
/** Description text for the label */
description: string;
/** Label name/title */
name: string;
}Usage:
const existingLabels: GitHubLabel[] = [
{
color: "d73a4a",
description: "Something isn't working",
name: "bug"
},
{
color: "a2eeef",
description: "New feature or request",
name: "enhancement"
}
];Defines npm package access level configuration options.
/**
* npm package access level for publishing
*/
type PackageAccess = "public" | "restricted";Defines Node.js module system configuration options.
/**
* package.json module type configuration
*/
type PackageType = "commonjs" | "module";Defines package.json binary entry point configuration.
/**
* package.json bin field configuration
* Can be a single binary or multiple named binaries
*/
type BinaryConfig = string | Record<string, string>;Usage:
// Single binary
const singleBin: BinaryConfig = "./bin/cli.js";
// Multiple binaries
const multipleBins: BinaryConfig = {
"my-cli": "./bin/cli.js",
"my-tool": "./bin/tool.js"
};Default configuration values used throughout the Create TypeScript App system.
/**
* Default configuration values for the template system
*/
const defaults: {
node: {
/** Default minimum Node.js version requirement */
minimum: "20.19.0";
/** Default pinned Node.js version for development */
pinned: "24.3.0";
};
};Types from the bingo-stratum framework used in Create TypeScript App's API.
/**
* Bingo-stratum template object for project generation
*/
type Template = import("bingo-stratum").Template;
/**
* Configuration object returned by createConfig function
*/
type TemplateConfig = import("bingo-stratum").TemplateConfig;
/**
* Base template configuration from bingo-stratum
*/
type BaseTemplate = import("bingo-stratum").BaseTemplate;
/**
* Individual template block for specific functionality
*/
type Block = import("bingo-stratum").Block;
/**
* Preset configuration combining multiple blocks
*/
type Preset = import("bingo-stratum").Preset;// Import all types
import type {
BaseOptions,
Contributor,
Documentation,
Readme,
WorkflowVersion,
WorkflowVersions,
WorkflowsVersions
} from "create-typescript-app";
// Use in configuration
const config: BaseOptions = {
directory: "./my-project",
title: "My TypeScript Project",
repository: "my-project",
owner: "username",
contributors: [] as Contributor[],
documentation: {} as Documentation,
workflowsVersions: {} as WorkflowsVersions
};