types.ts

Metadata types for library source code analysis.

These types represent the structure of src/lib/ exports, extracted at build time via TypeScript compiler analysis. Used for generating API documentation and enabling code search.

Hierarchy: ModuleJsonDeclarationJson (discriminated union on kind) → MemberJson (discriminated union on kind)

Zod input/output split

Array fields use .default([]) so they're optional in serialized JSON (compact) but guaranteed [] at runtime after .parse(). Input types (ModuleJsonInput, DeclarationJsonInput, ComponentPropJsonInput) accept optional arrays; output types (ModuleJson, DeclarationJson, ComponentPropJson) guarantee arrays. Use compactReplacer (in declaration-helpers.ts) with JSON.stringify for compact output.

Discriminated union

DeclarationJson is a z.discriminatedUnion on kind with 9 variants: FunctionDeclarationJson, ClassDeclarationJson, InterfaceDeclarationJson, TypeDeclarationJson, VariableDeclarationJson, EnumDeclarationJson, ComponentDeclarationJson, SnippetDeclarationJson, NamespaceDeclarationJson. Each variant has only the fields relevant to that kind, enforced by z.strictObject. Use isKind (in declaration-helpers.ts) to narrow.

MemberJson is similarly a z.discriminatedUnion on kind with 3 variants: FunctionMemberJson, VariableMemberJson, ConstructorMemberJson. Each variant has only the fields relevant to that member kind.

Internal analysis code that constructs declarations incrementally uses DeclarationJsonBuild — a permissive interface with all fields optional. Zod validation at the ModuleJson.parse() boundary enforces variant correctness.

@see declaration-helpers.ts for display formatting and type narrowing utilities @see analyze.ts for the main analysis entry points @see tsdoc.ts for JSDoc/TSDoc extraction into these types @see postprocess.ts for post-processing (mergeReExports, findDuplicates)

view source

Declarations
#

33 declarations

ClassDeclarationJson
#

types.ts view source

also exported from index.ts

ZodObject<{ kind: ZodLiteral<"class">; extends: ZodOptional<ZodString>; implements: ZodDefault<ZodArray<ZodString>>; ... 15 more ...; genericParams: ZodDefault<...>; }, $strict> import type {ClassDeclarationJson} from 'svelte-docinfo/types.js';

A class declaration. Has members, extends, implements.

ComponentDeclarationJson
#

types.ts view source

also exported from index.ts

ZodObject<{ kind: ZodLiteral<"component">; intersects: ZodDefault<ZodArray<ZodString>>; props: ZodDefault<ZodArray<ZodObject<{ examples: ZodDefault<ZodArray<ZodString>>; ... 10 more ...; parameters: ZodOptional<...>; }, $strict>>>; ... 16 more ...; genericParams: ZodDefault<...>; }, $strict> import type {ComponentDeclarationJson} from 'svelte-docinfo/types.js';

A Svelte component declaration. Has props, intersects, acceptsChildren.

ComponentPropJson
#

types.ts view source

also exported from index.ts

ZodObject<{ examples: ZodDefault<ZodArray<ZodString>>; deprecatedMessage: ZodOptional<ZodString>; seeAlso: ZodDefault<ZodArray<ZodString>>; ... 8 more ...; parameters: ZodOptional<...>; }, $strict> import type {ComponentPropJson} from 'svelte-docinfo/types.js';

Component prop information for Svelte components.

Standalone schema (not extending ParameterJson) because component props have different semantics: named attributes with no positional order (<Foo {a} {b} /> = <Foo {b} {a} />), no rest parameters, and support for two-way binding via $bindable rune.

ComponentPropJsonInput
#

types.ts view source

{ name: string; type: string; examples?: string[] | undefined; deprecatedMessage?: string | undefined; seeAlso?: string[] | undefined; throws?: { description: string; type?: string | undefined; }[] | undefined; ... 5 more ...; parameters?: { ...; }[] | undefined; } import type {ComponentPropJsonInput} from 'svelte-docinfo/types.js';

name

Prop name as declared in the component's $props() type.

type string

type

Resolved TypeScript type string.

type string

examples?

Code examples from @example tags.

type string[]

deprecatedMessage?

Deprecation message from @deprecated tag.

type string

seeAlso?

Related items from @see tags, in raw TSDoc format.

type string[]

throws?

Exceptions from @throws tags.

type { description: string; type?: string | undefined; }[]

since?

Version introduced, from @since tag.

type string

optional?

Whether the prop is optional in the component's props type.

type boolean

description?

Description from JSDoc on the prop's type declaration.

type string

defaultValue?

Default value expression from destructuring or @default tag.

type string

bindable?

Whether the prop uses the $bindable() rune, enabling two-way binding.

type boolean

parameters?

Structured parameters for callable props (e.g., Snippet<[text: string]>).

Present when the prop has extractable parameters, absent otherwise. Only populated when there are actual parameters — bare Snippet / Snippet<[]> does not set this field. Intentionally .optional() rather than .default([]) (see the array-field policy note above): absence is a meaningful signal, not an empty list.

type { name: string; type: string; optional?: boolean | undefined; rest?: boolean | undefined; description?: string | undefined; defaultValue?: string | undefined; propertyDescriptions?: Record<...> | undefined; }[]

ConstructorMemberJson
#

types.ts view source

also exported from index.ts

ZodObject<{ kind: ZodLiteral<"constructor">; name: ZodUnion<readonly [ZodLiteral<"constructor">, ZodLiteral<"(construct)">]>; parameters: ZodDefault<ZodArray<ZodObject<...>>>; ... 12 more ...; genericParams: ZodDefault<...>; }, $strict> import type {ConstructorMemberJson} from 'svelte-docinfo/types.js';

A constructor member (class constructor, construct signature). Has parameters, overloads — but not returnType/returnDescription (constructors always return their class).

name is narrowed to two literal sentinels: 'constructor' for class constructors and '(construct)' for interface/type-alias construct signatures (which share kind: 'constructor' but originate from getConstructSignatures() on a non-class type — no user-chosen identifier exists). The literal is preserved (rather than omitted) so getDisplayName and consumer renderers reading member.name keep working without a constructor-specific branch.

DeclarationJson
#

types.ts view source

also exported from index.ts

ZodDiscriminatedUnion<[ZodObject<{ kind: ZodLiteral<"function">; returnType: ZodOptional<ZodString>; returnDescription: ZodOptional<ZodString>; ... 16 more ...; genericParams: ZodDefault<...>; }, $strict>, ... 7 more ..., ZodObject<...>], "kind"> import type {DeclarationJson} from 'svelte-docinfo/types.js';

Metadata for an exported declaration (function, type, class, component, etc.).

Discriminated union on kind — each variant has only the fields relevant to that kind. Use isKind (in declaration-helpers.ts) to narrow, or check declaration.kind directly.

DeclarationJsonInput
#

types.ts view source

{ kind: "function"; name: string; returnType?: string | undefined; returnDescription?: string | undefined; parameters?: { name: string; type: string; optional?: boolean | undefined; rest?: boolean | undefined; description?: string | undefined; defaultValue?: string | undefined; propertyDescriptions?: Record<...> | u... import type {DeclarationJsonInput} from 'svelte-docinfo/types.js';

DeclarationKind
#

types.ts view source

also exported from index.ts

ZodEnum<{ function: "function"; type: "type"; variable: "variable"; class: "class"; interface: "interface"; enum: "enum"; component: "component"; snippet: "snippet"; namespace: "namespace"; }> import type {DeclarationKind} from 'svelte-docinfo/types.js';

The kind of top-level exported declaration.

Does not include 'constructor' — constructors only appear as MemberKind (nested in classes, interfaces, or types with construct signatures), never as top-level module exports.

DeclarationModifier
#

types.ts view source

also exported from index.ts

ZodEnum<{ public: "public"; protected: "protected"; readonly: "readonly"; static: "static"; abstract: "abstract"; getter: "getter"; setter: "setter"; }> import type {DeclarationModifier} from 'svelte-docinfo/types.js';

TypeScript modifier keywords extracted from declarations.

Only modifiers that appear on public API members are included. Private members (including #field syntax) are filtered out during analysis. Protected members are included as part of the extension API.

EnumDeclarationJson
#

types.ts view source

also exported from index.ts

ZodObject<{ kind: ZodLiteral<"enum">; members: ZodDefault<ZodArray<ZodDiscriminatedUnion<[ZodObject<{ kind: ZodLiteral<"function">; name: ZodString; optional: ZodDefault<ZodBoolean>; ... 15 more ...; genericParams: ZodDefault<...>; }, $strict>, ZodObject<...>, ZodObject<...>], "kind">>>; ... 14 more ...; genericPara... import type {EnumDeclarationJson} from 'svelte-docinfo/types.js';

An enum declaration. Has members for enum values.

ExternalReExportJson
#

types.ts view source

also exported from index.ts

ZodObject<{ name: ZodString; specifier: ZodString; originalName: ZodOptional<ZodString>; typeOnly: ZodDefault<ZodBoolean>; sourceLine: ZodOptional<...>; }, $strict> import type {ExternalReExportJson} from 'svelte-docinfo/types.js';

A re-export whose immediate target is outside the analyzed source set — export {x} from 'pkg', export {x as y} from 'pkg', or export * as ns from 'pkg'.

specifier is the module specifier as written (usually a package name); there is no canonical declaration to resolve, so these entries are flat facts about the statement rather than edges into the module graph.

Only statements that *directly* reference the external specifier are captured. Forms that stay silent: import {x} from 'pkg'; export {x}; (import-then-export), re-export chains that reach a package through another source module (that module owns the entry), and specifiers the checker can't resolve. Statement-level @nodocs suppresses the entry.

ExternalReExportJsonInput
#

types.ts view source

{ name: string; specifier: string; originalName?: string | undefined; typeOnly?: boolean | undefined; sourceLine?: number | undefined; } import type {ExternalReExportJsonInput} from 'svelte-docinfo/types.js';

name

Public exported name from this module.

type string

specifier

Module specifier as written in the statement (e.g. 'pkg').

type string

originalName?

The name inside the external module when renamed (export {x as y} from 'pkg''x'). Omitted for same-name re-exports and namespace form (export * as ns).

type string

typeOnly?

Whether the statement or specifier is type-only — see ReExportJson.typeOnly.

type boolean

sourceLine?

1-based line of the export specifier in this module's source.

type number

FunctionDeclarationJson
#

types.ts view source

also exported from index.ts

ZodObject<{ kind: ZodLiteral<"function">; returnType: ZodOptional<ZodString>; returnDescription: ZodOptional<ZodString>; ... 16 more ...; genericParams: ZodDefault<...>; }, $strict> import type {FunctionDeclarationJson} from 'svelte-docinfo/types.js';

A function declaration. Has parameters, returnType, returnDescription, overloads.

FunctionMemberJson
#

types.ts view source

also exported from index.ts

ZodObject<{ kind: ZodLiteral<"function">; name: ZodString; optional: ZodDefault<ZodBoolean>; returnType: ZodOptional<ZodString>; ... 14 more ...; genericParams: ZodDefault<...>; }, $strict> import type {FunctionMemberJson} from 'svelte-docinfo/types.js';

A function member (method, call signature, method signature). Has parameters, returnType, returnDescription, overloads.

optional reflects a ? token on the declaration (e.g., foo?(): void on an interface or type literal). Always false for index/call/construct signatures and for class methods (TypeScript disallows optional methods on classes).

name is the user-chosen method/property identifier, except for call signatures on interfaces and type aliases where it is the literal sentinel '(call)'.

GenericParamJson
#

types.ts view source

also exported from index.ts

ZodObject<{ name: ZodString; constraint: ZodOptional<ZodString>; defaultType: ZodOptional<ZodString>; }, $strict> import type {GenericParamJson} from 'svelte-docinfo/types.js';

Generic type parameter metadata extracted from declarations like <T extends string = unknown>.

Present on functions, classes, interfaces, type aliases, and Svelte components that declare generic type parameters.

InterfaceDeclarationJson
#

types.ts view source

also exported from index.ts

ZodObject<{ kind: ZodLiteral<"interface">; extends: ZodDefault<ZodArray<ZodString>>; members: ZodDefault<ZodArray<ZodDiscriminatedUnion<[ZodObject<{ kind: ZodLiteral<"function">; ... 17 more ...; genericParams: ZodDefault<...>; }, $strict>, ZodObject<...>, ZodObject<...>], "kind">>>; ... 14 more ...; genericParams: ... import type {InterfaceDeclarationJson} from 'svelte-docinfo/types.js';

An interface declaration. Has members, extends.

MemberJson
#

types.ts view source

also exported from index.ts

ZodDiscriminatedUnion<[ZodObject<{ kind: ZodLiteral<"function">; name: ZodString; optional: ZodDefault<ZodBoolean>; returnType: ZodOptional<ZodString>; ... 14 more ...; genericParams: ZodDefault<...>; }, $strict>, ZodObject<...>, ZodObject<...>], "kind"> import type {MemberJson} from 'svelte-docinfo/types.js';

Metadata for a nested declaration within a class, interface, type, or enum.

Discriminated union on kind with 3 variants: FunctionMemberJson, VariableMemberJson, ConstructorMemberJson. Use isKind (in declaration-helpers.ts) to narrow, or check member.kind directly.

Does not include fields that exist on declarations but not on members (extends, intersects, implements, props, alsoExportedFrom, aliasOf).

Nesting is exactly one level deep — members never contain their own members.

MemberJsonInput
#

types.ts view source

{ kind: "function"; name: string; optional?: boolean | undefined; returnType?: string | undefined; returnDescription?: string | undefined; parameters?: { name: string; type: string; optional?: boolean | undefined; rest?: boolean | undefined; description?: string | undefined; defaultValue?: string | undefined; proper... import type {MemberJsonInput} from 'svelte-docinfo/types.js';

MemberKind
#

types.ts view source

also exported from index.ts

ZodEnum<{ function: "function"; variable: "variable"; constructor: "constructor"; }> import type {MemberKind} from 'svelte-docinfo/types.js';

The subset of declaration kinds that appear as nested members in classes, interfaces, and types.

Class members include constructors ('constructor'), methods ('function'), and properties/accessors ('variable'). Interface/type properties use the same kinds for property signatures, method signatures, index signatures, and call/construct signatures.

Top-level-only kinds ('class', 'interface', 'type', 'enum', 'component') never appear as members — nesting is exactly one level deep.

ModuleJson
#

types.ts view source

also exported from index.ts

ZodObject<{ path: ZodString; declarations: ZodDefault<ZodArray<ZodDiscriminatedUnion<[ZodObject<{ kind: ZodLiteral<"function">; returnType: ZodOptional<ZodString>; returnDescription: ZodOptional<...>; ... 16 more ...; genericParams: ZodDefault<...>; }, $strict>, ... 7 more ..., ZodObject<...>], "kind">>>; ... 7 more... import type {ModuleJson} from 'svelte-docinfo/types.js';

Metadata for a source module — the top-level container in the data model.

analyze and analyzeFromFiles return Array<ModuleJson> sorted alphabetically by path. Each module contains its exported declarations, dependency graph, and optional moduleComment.

ModuleJsonInput
#

types.ts view source

{ path: string; declarations?: ({ kind: "function"; name: string; returnType?: string | undefined; returnDescription?: string | undefined; parameters?: { name: string; type: string; optional?: boolean | undefined; rest?: boolean | undefined; description?: string | undefined; defaultValue?: string | undefined; proper... import type {ModuleJsonInput} from 'svelte-docinfo/types.js';

path

Path relative to sourceRoot (e.g., helpers.ts for the default SvelteKit src/lib layout). sourceRoot is configurable via createSourceOptions / the CLI --source-root flag — consumers with a custom layout (e.g., sourcePaths: ['src/lib', 'src/routes'], sourceRoot: 'src') see prefixes like lib/foo.ts here.

type string

declarations?

Exported declarations from this module.

type ({ kind: "function"; name: string; returnType?: string | undefined; returnDescription?: string | undefined; parameters?: { name: string; type: string; optional?: boolean | undefined; rest?: boolean | undefined; description?: string | undefined; defaultValue?: string | undefined; propertyDescriptions?: Record<...> | ...

moduleComment?

File-level JSDoc comment (from @module tag).

type string

dependencies?

Modules this imports (paths relative to sourceRoot).

type string[]

dependents?

Modules that import this (paths relative to sourceRoot).

type string[]

starExports?

Modules fully re-exported via export * from './module'. Paths are relative to sourceRoot. Statement-level @nodocs suppresses the entry, like the other re-export encodings.

type string[]

reExports?

Same-name re-exports in this module's source, sorted by name then module (names can collide — see ReExportJson). The forward view of alsoExportedFrom — see ReExportJson for the full contract (canonical resolution, Svelte default-slot naming, @nodocs suppression, presence caveats).

type { name: string; module: string; typeOnly?: boolean | undefined; sourceLine?: number | undefined; }[]

externalReExports?

Re-exports whose immediate target is an external package, sorted by name then specifier. See ExternalReExportJson for which forms are captured.

type { name: string; specifier: string; originalName?: string | undefined; typeOnly?: boolean | undefined; sourceLine?: number | undefined; }[]

externalStarExports?

External modules fully re-exported via export * from 'pkg', as written (statement order). The projected names are unknown — the package isn't analyzed. Statement-level @nodocs suppresses the entry; unresolvable specifiers are skipped.

type string[]

partial?

Whether the module is a placeholder for a file that couldn't be analyzed.

Currently only set for Svelte files where svelte2tsx threw at ingest (the transform_failed diagnostic carries the error). Placeholder modules have declarations: [] and serve as a structural slot so the modules array reflects the full owned set; consumers render them as "broken" entries.

type boolean

NamespaceDeclarationJson
#

types.ts view source

also exported from index.ts

ZodObject<{ kind: ZodLiteral<"namespace">; module: ZodString; alsoExportedFrom: ZodDefault<ZodArray<ZodString>>; aliasOf: ZodOptional<ZodObject<{ ...; }, $strict>>; ... 12 more ...; genericParams: ZodDefault<...>; }, $strict> import type {NamespaceDeclarationJson} from 'svelte-docinfo/types.js';

A namespace re-export binding: export * as ns from './x'.

Carries no inline members — module points to the source module whose declarations are projected under this name. Consumers that want to render ns.a can deref by reading the source module's declarations array.

OverloadJson
#

types.ts view source

also exported from index.ts

ZodObject<{ typeSignature: ZodString; parameters: ZodDefault<ZodArray<ZodObject<{ name: ZodString; type: ZodString; optional: ZodDefault<ZodBoolean>; rest: ZodDefault<...>; description: ZodOptional<...>; defaultValue: ZodOptional<...>; propertyDescriptions: ZodOptional<...>; }, $strict>>>; returnType: ZodOptional<..... import type {OverloadJson} from 'svelte-docinfo/types.js';

A single function overload signature.

When a function has multiple overload signatures, each public overload is captured here. The implementation signature is excluded.

OverloadJsonInput
#

types.ts view source

{ typeSignature: string; parameters?: { name: string; type: string; optional?: boolean | undefined; rest?: boolean | undefined; description?: string | undefined; defaultValue?: string | undefined; propertyDescriptions?: Record<...> | undefined; }[] | undefined; returnType?: string | undefined; genericParams?: { ...;... import type {OverloadJsonInput} from 'svelte-docinfo/types.js';

typeSignature

Full TypeScript type signature for this overload.

type string

parameters?

Parameters for this overload.

type { name: string; type: string; optional?: boolean | undefined; rest?: boolean | undefined; description?: string | undefined; defaultValue?: string | undefined; propertyDescriptions?: Record<...> | undefined; }[]

returnType?

Return type for this overload.

type string

genericParams?

Generic type parameters for this overload.

type { name: string; constraint?: string | undefined; defaultType?: string | undefined; }[]

docComment?

JSDoc/TSDoc comment specific to this overload.

type string

returnDescription?

Return value description from @returns tag on this overload.

type string

ParameterJson
#

types.ts view source

also exported from index.ts

ZodObject<{ name: ZodString; type: ZodString; optional: ZodDefault<ZodBoolean>; rest: ZodDefault<ZodBoolean>; description: ZodOptional<...>; defaultValue: ZodOptional<...>; propertyDescriptions: ZodOptional<...>; }, $strict> import type {ParameterJson} from 'svelte-docinfo/types.js';

Parameter information for functions and methods.

Kept distinct from ComponentPropJson despite structural similarity. Function parameters form a tuple with positional semantics: calling order matters (fn(a, b) vs fn(b, a)), may include rest parameters and destructuring patterns.

ParameterJsonInput
#

types.ts view source

{ name: string; type: string; optional?: boolean | undefined; rest?: boolean | undefined; description?: string | undefined; defaultValue?: string | undefined; propertyDescriptions?: Record<...> | undefined; } import type {ParameterJsonInput} from 'svelte-docinfo/types.js';

name

Parameter name (e.g., options, ...args).

type string

type

Resolved TypeScript type string (e.g., string, Record<string, unknown>).

type string

optional?

Whether the parameter has a ? token.

type boolean

rest?

Whether the parameter uses rest syntax (...args).

type boolean

description?

Description from @param tag.

type string

defaultValue?

Default value expression from the source (e.g., 'hello', 42).

type string

propertyDescriptions?

Descriptions for properties of a named object parameter, from dotted @param tags (@param obj.prop - ...).

Keyed by the sub-path relative to this parameter — @param obj.prop becomes {prop: '...'}, @param obj.a.b becomes {'a.b': '...'}. Keys are unvalidated against the parameter's actual type (matching the @mutates philosophy); absent when no dotted @param tags reference this parameter. Only populated for function/method/constructor signature parameters.

Matching is by the parameter's name, so destructured parameters (fn({a, b}: T)) are not covered — TypeScript names them __0, with no author-facing identifier for a @param key to reference.

type Record<string, string>

Reactivity
#

types.ts view source

also exported from index.ts

ZodEnum<{ $state: "$state"; "$state.raw": "$state.raw"; $derived: "$derived"; "$derived.by": "$derived.by"; }> import type {Reactivity} from 'svelte-docinfo/types.js';

Reactivity flavor for a variable declaration or class field, captured from the rune call at the initializer (e.g., let count = $state(0)).

Only the value-producing reactivity runes are represented here — $props and $bindable are modeled separately as ComponentPropJson.bindable (and prop-presence on the props array). A renderer wanting "all rune annotations across declarations and props" needs to read both this field and ComponentPropJson.bindable.

  • $state — deeply reactive proxy
  • $state.raw — reference-only reactive (no proxy)
  • $derived — recomputed from dependencies (re-assignable)
  • $derived.by — same as $derived, with a function argument

Detection is syntactic (AST-based) and runs on every analyzed file regardless of extension. Most reactive declarations live in .svelte, .svelte.ts, or .svelte.js, but the field will also surface on any .ts/.js file that uses the same rune call patterns — by design, so documentation pipelines can capture any rune-shaped declaration their conventions choose to expose.

ReExportJson
#

types.ts view source

also exported from index.ts

ZodObject<{ name: ZodString; module: ZodString; typeOnly: ZodDefault<ZodBoolean>; sourceLine: ZodOptional<ZodNumber>; }, $strict> import type {ReExportJson} from 'svelte-docinfo/types.js';

A same-name re-export edge, from the re-exporting module's side.

Each entry on ModuleJson.reExports records that the module's source contains export {name} from ... where the canonical declaration lives in module. This is the forward view of the same fact that alsoExportedFrom records on the canonical declaration — consumers resolve the canonical by (module, name), the same lookup contract as aliasOf.

Same-name re-exports of analyzed source only. Renamed re-exports appear as declarations with aliasOf in the re-exporting module; star exports live in ModuleJson.starExports; external re-exports in ModuleJson.externalReExports / externalStarExports. Use resolveExportSurface (in postprocess.ts) to combine all of these into a module's full export surface — it handles the name dedup (a documented same-name re-export appears both here and as a synthesized alias declaration) and the ES star semantics (explicit exports shadow star-projected ones, names ambiguous between stars are excluded, default doesn't project).

module points at the *canonical* module (multi-hop chains are resolved), not the immediate specifier in the export statement. For Svelte default-slot re-exports (export {default} from './X.svelte'), name is the component name derived from the filename ('X'), matching the canonical declaration's name — the same exception documented on aliasOf. Because of that re-keying, two entries in one module can share a name (a re-keyed component colliding with a same-name re-export from another module); (module, name) pairs remain unique (exact duplicates are deduped at construction).

@nodocs on the export statement suppresses the entry (and the alsoExportedFrom back-link). When the canonical declaration itself is @nodocs, or the canonical module isn't part of the analyzed set, the entry still exists but has no matching back-link — the same presence caveat as aliasOf.module and starExports.

ReExportJsonInput
#

types.ts view source

{ name: string; module: string; typeOnly?: boolean | undefined; sourceLine?: number | undefined; } import type {ReExportJsonInput} from 'svelte-docinfo/types.js';

name

Exported name — the canonical declaration's name in module.

type string

module

Module path (relative to sourceRoot) where the canonical declaration lives.

type string

typeOnly?

Whether the statement (export type {A} from ...) or specifier (export {type A} from ...) is type-only — the name is erased at runtime and importable only via import type.

type boolean

sourceLine?

1-based line of the export specifier in this module's source. When identical (name, module) edges are deduped (Svelte default-slot re-keying), the smallest line is kept.

type number

SnippetDeclarationJson
#

types.ts view source

also exported from index.ts

ZodObject<{ kind: ZodLiteral<"snippet">; parameters: ZodDefault<ZodArray<ZodObject<{ name: ZodString; type: ZodString; optional: ZodDefault<ZodBoolean>; rest: ZodDefault<...>; description: ZodOptional<...>; defaultValue: ZodOptional<...>; propertyDescriptions: ZodOptional<...>; }, $strict>>>; ... 14 more ...; generi... import type {SnippetDeclarationJson} from 'svelte-docinfo/types.js';

A Svelte snippet declaration exported from <script module>. Has parameters.

TypeDeclarationJson
#

types.ts view source

also exported from index.ts

ZodObject<{ kind: ZodLiteral<"type">; intersects: ZodDefault<ZodArray<ZodString>>; members: ZodDefault<ZodArray<ZodDiscriminatedUnion<[ZodObject<{ kind: ZodLiteral<"function">; ... 17 more ...; genericParams: ZodDefault<...>; }, $strict>, ZodObject<...>, ZodObject<...>], "kind">>>; ... 14 more ...; genericParams: Zo... import type {TypeDeclarationJson} from 'svelte-docinfo/types.js';

A type alias declaration. Has members, intersects.

VariableDeclarationJson
#

types.ts view source

also exported from index.ts

ZodObject<{ kind: ZodLiteral<"variable">; reactivity: ZodOptional<ZodEnum<{ $state: "$state"; "$state.raw": "$state.raw"; $derived: "$derived"; "$derived.by": "$derived.by"; }>>; ... 15 more ...; genericParams: ZodDefault<...>; }, $strict> import type {VariableDeclarationJson} from 'svelte-docinfo/types.js';

A variable declaration. Has optional reactivity for top-level rune-module exports (e.g., export let count = $state(0) in .svelte.ts or <script module>).

VariableMemberJson
#

types.ts view source

also exported from index.ts

ZodObject<{ kind: ZodLiteral<"variable">; optional: ZodDefault<ZodBoolean>; reactivity: ZodOptional<ZodEnum<{ $state: "$state"; "$state.raw": "$state.raw"; $derived: "$derived"; "$derived.by": "$derived.by"; }>>; ... 13 more ...; genericParams: ZodDefault<...>; }, $strict> import type {VariableMemberJson} from 'svelte-docinfo/types.js';

A variable member (property, accessor, index signature, enum value). Shared fields plus optional reactivity for class fields initialized with a Svelte rune ($state, $state.raw, $derived, $derived.by).

optional reflects a ? token on the declaration (e.g., x?: string). Always false for index signatures and enum values.

Imported by
#