UNPKG

typed-aws

Version:

Helps you write AWS CloudFormation in TypeScript

37 lines (36 loc) 1.44 kB
import { SpecRegistry } from './parser'; import { SchemaRegistry, Schema, TypeDefinition, LiteralType } from './types'; export declare function createModels(registry: SchemaRegistry, specs: SpecRegistry): Record<string, ModuleModel>; export declare function getAllResources(modules: Record<string, ModuleModel>): ResourceModel[]; export declare class ModuleModel { readonly name: string; resources: Record<string, ResourceModel>; constructor(name: string); addSchemaType(schema: Schema, specs: SpecRegistry): void; } export declare class ResourceModel { readonly name: string; readonly module: ModuleModel; types: TypeModel[]; constructor(name: string, module: ModuleModel); mainModel: TypeModel; mainSchema: Schema; addSchemaType(schema: Schema, specs: SpecRegistry): void; toString(): string; } declare class TypeModel<Type extends TypeDefinition = TypeDefinition> { readonly schema: Schema<Type>; readonly names: string[]; readonly specs: SpecRegistry; description?: string; pattern?: string; resourceType?: string; readonly name: string; readonly type: LiteralType; constructor(schema: Schema<Type>, names: string[], specs: SpecRegistry); getName(): string | undefined; getPropertyDocs(propertyName?: string | typeof AnyProperty): string | undefined; getTypeDocumentation(): string; } declare const AnyProperty: unique symbol; export {};