also exported from index.ts
{ kind: "class"; extends: string[]; externalTypes: string[]; implements: string[]; members: ({ kind: "function"; name: string; optional: boolean; parameters: { name: string; type: string; optional: boolean; ... 4 more ...; propertyDescriptions?: Record<...> | undefined; }[]; ... 17 more ...; sourceLine?: number | un... import {ClassDeclarationJson} from 'svelte-docinfo/types.js'; A class declaration. Has members, extends, implements.
kind
type "class"
extends
Extended base class — 0 or 1 entries (TypeScript allows only one base).
An array so every heritage field (extends, implements,
externalTypes, InterfaceDeclarationJson.extends) shares one shape;
consumers iterate heritage uniformly instead of branching on kind.
Verbatim text of this declaration's own heritage clause (as is
implements), so it is spelled as this module wrote it and resolves in
its scope — a local rename stays the local name, where externalTypes
resolves renames because its walk crosses modules.
type string[]
see also
``implements`` (this variant),
InterfaceDeclarationJson.extendsfor the other verbatim heritage fields,externalTypes(this variant) for the resolved external reach.
externalTypes
External types the extends chain reaches whose contributions members
never enumerates — the class counterpart of
InterfaceDeclarationJson.externalTypes, descending through local base
classes. implements contributes nothing: an implemented interface adds
no members, the class declares its own.
Entry normalization (rename resolution, type-parameter substitution,
text-dedupe, source order) matches TypeDeclarationJson.externalTypes.
type string[]
implements
Implemented interfaces.
type string[]
members
Class members: methods, properties, constructors, getters/setters — own members only, inherited members excluded whatever their origin.
type ({ kind: "function"; name: string; optional: boolean; parameters: { name: string; type: string; optional: boolean; rest: boolean; typeInfo?: TypeJson | undefined; description?: string | undefined; defaultValue?: string | undefined; propertyDescriptions?: Record<...> | undefined; }[]; ... 17 more ...; sourceLine?: nu...
alsoExportedFrom
Module paths (relative to sourceRoot) that re-export this declaration under the same name.
The canonical declaration lives in this module's declarations array;
these paths are additional import locations for the same thing.
The same edges appear from the re-exporting side as ModuleJson.reExports
— use that when asking "what does this module re-export" instead of
inverting these arrays. The two can disagree at the margins: a reExports
entry whose canonical declaration is @nodocs (or whose module isn't in
the analyzed set) has no back-link here.
Consumer note: To build a complete re-export map, scan two fields:
alsoExportedFromon each declaration — same-name re-exportsaliasOfon declarations — renamed re-exports (separate declarations)
type string[]
partial
Whether extraction failed partway through, leaving some fields missing (e.g., typeSignature, parameters).
type boolean
examples
Code examples from @example tags.
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; }[]
name
The exported name. Always populated. The default-export slot is named
'default' — that's the symbol's actual name in JS
(import {default as X} and ns.default both expose it directly), and
import X from 'mod' is sugar for import {default as X}. Consumers
branch on name === 'default' to render the sugar form when desired.
type string
modifiers
TypeScript modifiers like readonly, static, or protected.
type ("public" | "protected" | "readonly" | "static" | "abstract" | "getter" | "setter")[]
genericParams
Generic type parameters like <T, U>.
type { name: string; constraint?: string | undefined; defaultType?: string | undefined; }[]
aliasOf?
For renamed re-exports (export {foo as bar}), points to the original declaration.
This declaration's name is the alias; aliasOf.name is the original name.
For renames out of the default slot (export {default as bar} from './x' where
./x is export default ...), aliasOf.name is 'default' — the canonical's
actual symbol name. Consumers locate the canonical by (aliasOf.module, aliasOf.name).
Svelte component exception: when the source is a .svelte file (e.g.,
export {default as Foo} from './X.svelte'), the canonical's name is the
component name (derived from the filename), so aliasOf.name is the
component name ('X'), NOT 'default'. Consumers that branch on
aliasOf.name === 'default' to detect default-rename should additionally
check whether aliasOf.module ends with .svelte.
Different from alsoExportedFrom: aliases create new API surface names,
while alsoExportedFrom tracks additional import paths for the same name.
type { module: string; name: string; }
internalMessage?
Internal-API marker from the @internal tag. Presence means the tag was
written; an empty string is a bare tag with no trailing prose.
A marker, not an exclusion: @internal means "not stable public API"
(TSDoc semantics) while the declaration stays documented — unlike
@nodocs, which removes it from output entirely.
Deliberately here rather than in docFields: declarations and members
only, not ComponentPropJson (widen to props as a separate additive
change if demand appears).
type string
mutates?
Mutation documentation from @mutates tags (non-standard), mapping keys to descriptions.
Keys are intentionally unvalidated — typically a parameter name, but
authors may also use compound paths (this.foo, obj.field) or external
state references (globalCache). The schema accepts any string key so
consumers can render whatever the author wrote.
type Record<string, string>
deprecatedMessage?
Deprecation message from @deprecated tag.
type string
since?
Version introduced, from @since tag.
type string
docComment?
JSDoc/TSDoc comment.
type string
typeSignature?
Full TypeScript type signature.
type string
sourceLine?
1-indexed line number in source file. Undefined for synthesized declarations (e.g., alias declarations from renamed re-exports).
type number