MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / parameterTypes

Function parameterTypes

src/resolution/override-parameters.ts:158–169  ·  view source on GitHub ↗

The parameter types `method` declares, each normalized (normalizeType); null when they can't be read.

(method: Node, context: ResolutionContext)

Source from the content-addressed store, hash-verified

156
157/** The parameter types `method` declares, each normalized (normalizeType); null when they can't be read. */
158function parameterTypes(method: Node, context: ResolutionContext): readonly string[] | null {
159 const list = parameterList(method, context);
160 if (list === null) return null;
161 const types: string[] = [];
162 for (const param of splitParameters(list)) {
163 const type = parameterType(param, method.language);
164 if (type === RECEIVER) continue;
165 if (type === null) return null;
166 types.push(normalizeType(type, method.language));
167 }
168 return types;
169}
170
171/** The text of `method`'s parameter list, without its parentheses; null when it can't be found. */
172function parameterList(method: Node, context: ResolutionContext): string | null {

Callers 1

typesOfFunction · 0.85

Calls 5

parameterListFunction · 0.85
parameterTypeFunction · 0.85
normalizeTypeFunction · 0.85
pushMethod · 0.80
splitParametersFunction · 0.70

Tested by

no test coverage detected