typescript-extract-type.ts view source
internal
Used by `analyzeDeclaration` — not part of the public barrel export.
(node: Node, declaration: DeclarationJsonBuild, ctx: ExtractContext): void import {extractEnumInfo} from 'svelte-docinfo/typescript-extract-type.js'; Extract enum member information from an enum declaration.
Iterates node.members to extract each enum member's name, initializer value,
type, and JSDoc. Members are represented as MemberJson with kind 'variable'.
A JS @enum {T} const (isJSDocEnumSymbol) arrives as its variable
declaration. Its typeSignature is the tag's type, T, the type the name
means in an annotation (@param {A} a takes any T), and its members are
the value's properties in declaration order, each with its own JSDoc and
checker type.
node
Nodedeclaration
ctx
returns
void mutates
declaration— adds members and typeSignature