Files and imports
FUNCTION
@skmtc/core 0.63.4matchDefinitions
The neutral name/type filter every language's findDefinitions shares. The language passes its definition list and a typeOf extractor - the one lang-specific bit, which narrows to the language's Identifier subclass to read the typed type (returned here as the opaque string).
- no
nameand notype→ returnsall(the whole list; the formerlistDefinitions). - otherwise → the matching subset, or
undefinedwhen nothing matches.
Signature
import { matchDefinitions } from '@skmtc/core'
matchDefinitions(
all: DefinitionBase[],
query: FindDefinitionsQuery | undefined,
typeOf: (identifier: IdentifierBase) => string | undefined
): DefinitionBase[] | undefinedParameters
Returns
DefinitionBase[] | undefined