import "../_dnt.polyfills.js"; import type { GenerateContextType } from '../context/generateTypes.js'; import { SnippetBase } from './SnippetBase.js'; import type { Stringable } from './Stringable.js'; import type { GeneratorKey } from './GeneratorKeys.js'; import type { OasRef } from '../oas/ref/Ref.js'; type CreateArgs = { context: GenerateContextType; value: Stringable; generatorKey?: GeneratorKey; }; /** * Represents a custom value in the SKMTC generation pipeline. * * CustomValue allows generators to create arbitrary content that doesn't fit * standard schema types. Used for injecting custom code, templates, or specialized * content during the generation process. * * @example Creating custom content * ```typescript * const customValue = new CustomValue({ * context: generateContext, * value: 'const customCode = "generated";', * generatorKey: 'my-generator' * }); * * console.log(customValue.toString()); // "const customCode = "generated";" * ``` */ export declare class CustomValue extends SnippetBase { /** Type identifier for this custom value */ type: "custom"; /** The underlying value content that can be converted to string */ value: Stringable; /** * Creates a new CustomValue instance. * * @param args - Creation arguments including context, value, and optional generator key */ constructor({ context, value, generatorKey }: CreateArgs); /** * Determines if this custom value is a reference. * * @returns Always false since custom values are concrete content, not references */ isRef(): this is OasRef<'schema'>; /** Always `false`: this value has no `readOnly`. */ isReadOnly(): boolean; /** Always `false`: this value has no `writeOnly`. */ isWriteOnly(): boolean; /** * Resolves this custom value. * * @returns The custom value itself since it's already resolved */ resolve(): CustomValue; /** * Resolves this custom value one level. * * @returns The custom value itself since it's already resolved */ resolveOnce(): CustomValue; /** * Converts the custom value to its string representation. * * @returns String representation of the underlying value */ toString(): string; } /** * Type guard function to check if a value is a CustomValue instance. * * @param value - Value to check * @returns True if the value is a CustomValue, false otherwise * * @example Type checking * ```typescript * if (isCustomValue(someValue)) { * console.log(someValue.value); // TypeScript knows it's a CustomValue * } * ``` */ export declare const isCustomValue: (value: unknown) => value is CustomValue; export {};