Skip to content

InterfaceDeclaration

Create a TypeScript interface declaration.

import { InterfaceDeclaration } from "@alloy-js/typescript";
<InterfaceDeclaration
default
doc={Children}
export
extends={Children}
flags={OutputSymbolFlags}
kind={"type" | "value"}
metadata={Record<string, unknown>}
name="string"
refkey={Refkey | Refkey[]}
/>

Props

childrenoptionalChildren
defaultoptionalboolean

Whether this is the default export of the module.

docoptionalChildren

Documentation for this declaration

exportoptionalboolean

Whether to export this declaration from the module.

extendsoptionalChildren
flagsoptionalOutputSymbolFlags

Flags for the symbol created by this component.

kindoptional”type” | “value”

Whether this is a declaration of a type (e.g. interface, type alias) or a value (e.g. var, const, let).

metadataoptionalRecord<string, unknown>

Arbitrary metadata about this declaration.

namestring

The base name of this declaration. May change depending on naming policy and any conflicts.

refkeyoptionalRefkey | Refkey[]

The refkey or array of refkeys for this declaration.

Remarks

This component will declare a symbol for this interface. The export and default boolean props determine whether and how this symbol is exported from the package.