Skip to main content

findParametersNode

@webda/content-mapper


Function: findParametersNode()

findParametersNode(declaration, checker, project, base?): TypeNodeBase | undefined

Defined in: packages/content-mapper/src/schema/service.ts:59

Find the parameters type node on a service class.

Two shapes are accepted, matching getSchemaNode:

  • class S extends Service<SParameters> — the type argument
  • class S<T extends SParameters> extends Service<T> — the constraint

The base chain is walked because a service commonly names its parameters on an intermediate class rather than on itself.

Parameters​

declaration​

ClassDeclaration

the service class

checker​

Checker

the checker resolving base types

project​

Project

project used to resolve declaration handles

base?​

string = "ServiceParameters"

name of the type the parameters must derive from

Returns​

TypeNodeBase | undefined

the type node, or undefined when the class declares none