UNPKG

@azure-tools/codemodel-v3

Version:
44 lines 2.22 kB
import { Channel, Host, JsonPath, Mapping, RawSourceMap, Message } from '@azure-tools/autorest-extension-base'; import { Initializer, DeepPartial } from '@azure-tools/codegen'; import { Dictionary } from '@azure-tools/linq'; export declare class ModelState<T extends Dictionary<any>> extends Initializer { protected service: Host; model: T; protected documentName: string; protected currentPath: JsonPath; private context; private _debug; private _verbose; constructor(service: Host, objectInitializer?: DeepPartial<ModelState<T>>); init(project?: any): Promise<this>; initContext(project: any): Promise<this>; readFile(filename: string): Promise<string>; getValue<V>(key: string, defaultValue?: V): Promise<V>; setValue<V>(key: string, value: V): Promise<void>; listInputs(artifactType?: string | undefined): Promise<Array<string>>; protectFiles(path: string): Promise<void>; writeFile(filename: string, content: string, sourceMap?: Array<Mapping> | RawSourceMap | undefined, artifactType?: string | undefined): void; message(message: Message): void; updateConfigurationFile(filename: string, content: string): void; getConfigurationFile(filename: string): Promise<string>; protected errorCount: number; protected static getModel<T>(service: Host): Promise<{ filename: string; model: T; }>; cache: Array<any>; replacer(key: string, value: any): any; resolveVariables(input: string): Promise<string>; path(...childPath: JsonPath): this; checkpoint(): void; protected msg(channel: Channel, message: string, key: Array<string>, details: any): void; warning(message: string, key: Array<string>, details?: any): void; hint(message: string, key: Array<string>, details?: any): void; error(message: string, key: Array<string>, details?: any): void; fatal(message: string, key: Array<string>, details?: any): void; protected output(channel: Channel, message: string, details?: any): void; debug(message: string, details: any): void; verbose(message: string, details: any): void; log(message: string, details: any): void; } //# sourceMappingURL=model-state.d.ts.map