import * as ts from "typescript"; import { Result } from "./utils/Result.js"; import type { GratsConfig } from "./TGratsConfig.js"; /** * For Grats's config object we need the following: * * - Post/parsing/validation TypeScript type * - Runtime validation * - Documentation (in code and on website) * - Dynamic config editor in the playground * * And we need to ensure all four stay in sync. To that end, we define the * config spec in JSON, which is used to generate the TypeScript type, * runtime validation, documentation, and the interactive config editor in * the playground. */ export { GratsConfig }; export type ParsedCommandLineGrats = Omit & { raw: { grats: GratsConfig; }; }; export declare function validateGratsOptions(options: ts.ParsedCommandLine): Result; export type ConfigSpec = { description: string; typeName: string; properties: { [propertyName: string]: PropertySpec; }; }; type PropertySpec = { description: string; type: PropertyType; nullable: boolean; default: string | boolean | null; experimental?: boolean; }; type PropertyType = { kind: "string"; } | { kind: "longString"; } | { kind: "boolean"; }; export declare function makeTypeScriptType(spec: ConfigSpec): string;