Skip to content

VarDeclaration

import { VarDeclaration } from "@alloy-js/typescript";
<VarDeclaration
const
default
doc={Children}
export
initializer={Children}
kind={"type" | "value"}
let
metadata={Record<string, unknown>}
name="string"
nullish
refkey={Refkey | Refkey[]}
type={Children}
var
/>
childrenoptionalChildren
constoptionalboolean
defaultoptionalboolean

Whether this is the default export of the module.

docoptionalChildren

Documentation for this declaration

exportoptionalboolean

Whether to export this declaration from the module.

initializeroptionalChildren
kindoptional”type” | “value”

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

letoptionalboolean
metadataoptionalRecord<string, unknown>

Arbitrary metadata about this declaration.

namestring

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

nullishoptionalboolean
refkeyoptionalRefkey | Refkey[]

The refkey or array of refkeys for this declaration.

typeoptionalChildren
varoptionalboolean