import { t as ComponentProps } from "./components-U6HOf5GS.mjs"; import { Children, Namekey, Refkey } from "@alloy-js/core"; import { CommonDeclarationProps, TypeParameterDescriptor } from "@alloy-js/typescript"; import { JsonSchema, JsonSchemaPrimitiveType } from "@power-plant/schema"; import { PartialKeys } from "@stryke/types/base"; //#region src/typescript/components/interface-declaration.d.ts interface InterfaceDeclarationProps extends PartialKeys, ComponentProps { /** * A base type that this interface extends. This can be used to represent inheritance */ extends?: Children; /** * The generic type parameters of the interface. */ typeParameters?: TypeParameterDescriptor[] | string[]; /** * The JSON Schema that describes the properties of this interface. * * @remarks * This is used to generate the members of the interface based on the properties of the schema. */ schema?: JsonSchema; /** * Documentation for the interface. This can be a string or any Alloy component that renders documentation content (such as `TSDoc`). */ doc?: Children; } type InterfaceDeclarationPropertyProps = InterfaceMemberProps & ComponentProps & { schema: JsonSchema; name: string; required: boolean; defaultValue?: unknown; }; interface InterfaceExpressionProps { children?: Children; } declare const InterfaceExpression: import("@alloy-js/core").Component; interface InterfaceMemberPropsBase { children?: Children; name: string | Namekey; doc?: Children; refkey?: Refkey | Refkey[]; readOnly?: boolean; type?: Children | JsonSchemaPrimitiveType | string; nullish?: boolean; required?: boolean; } interface InterfaceIndexerMemberProps extends InterfaceMemberPropsBase { indexer: Children; } interface InterfaceTypeMemberProps extends InterfaceMemberPropsBase { type: string; } interface InterfaceSchemaMemberProps extends InterfaceMemberPropsBase { schema: JsonSchema; } type InterfaceMemberProps = InterfaceIndexerMemberProps | InterfaceTypeMemberProps | InterfaceSchemaMemberProps; /** * Create a TypeScript interface member. * * An interface member can either provide a `name` prop to create a named * property, or an `indexer` prop to define an indexer for the interface. * * The type of the member can be provided either as the `type` prop or as the * children of the component. */ declare function InterfaceMember(props: InterfaceMemberProps): Children; /** * Generates a TypeScript interface for the given schema. */ declare function InterfaceDeclaration(props: InterfaceDeclarationProps): Children; /** * Generates a TypeScript interface property for the given reflection class. */ declare function InterfaceDeclarationProperty(props: InterfaceDeclarationPropertyProps): Children; //#endregion export { InterfaceExpression as a, InterfaceMember as c, InterfaceSchemaMemberProps as d, InterfaceTypeMemberProps as f, InterfaceDeclarationProps as i, InterfaceMemberProps as l, InterfaceDeclarationProperty as n, InterfaceExpressionProps as o, InterfaceDeclarationPropertyProps as r, InterfaceIndexerMemberProps as s, InterfaceDeclaration as t, InterfaceMemberPropsBase as u }; //# sourceMappingURL=interface-declaration-BYPMWd9b.d.mts.map