MCPcopy Index your code
hub / github.com/codeaashu/claude-code / normalizeTypeName

Function normalizeTypeName

src/tools/PowerShellTool/clmTypes.ts:194–203  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

192 * Handles array suffix ([]) and generic brackets.
193 */
194export function normalizeTypeName(name: string): string {
195 // Strip array suffix: "String[]" → "string" (arrays of allowed types are allowed)
196 // Strip generic args: "List[int]" → "list" (conservative — the generic wrapper
197 // might be unsafe even if the type arg is safe, so we check the outer type)
198 return name
199 .toLowerCase()
200 .replace(/\[\]$/, '')
201 .replace(/\[.*\]$/, '')
202 .trim()
203}
204
205/**
206 * True if typeName (from AST) is in Microsoft's CLM allowlist.

Callers 1

isClmAllowedTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected