typescript-extract-shared.ts view source
(declaration: DeclarationJsonBuild, heritageTypes: readonly ExpressionWithTypeArguments[], ctx: ExtractContext): void import {applyHeritageExternalTypes} from 'svelte-docinfo/typescript-extract-shared.js'; Set a declaration's externalTypes from its own heritage entries — the
interface/class counterpart of filterDocumentedProperties' annotation
walk, and the one place the two heritage-bearing extractors express it.
Interfaces and classes enumerate own members only, so nothing is *filtered*
— what the field records there is the external types the heritage
composition reaches whose contributions members therefore never
enumerates: interface Props extends HTMLButtonAttributes records the bag,
directly or through a local base chain, exactly as the same interface
annotating $props() records it on the component. Local bases reached and
fully enumerated nowhere are the extends field's business, not this one.
Only extends entries are passed by either caller: an interface has no
other clause kind, and a class's implements adds no members.
declaration
heritageTypes
readonly ExpressionWithTypeArguments[]ctx
returns
void mutates
declaration— sets `externalTypes` when the walk finds any, left absent when not