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

Function nodeTypeId

src/utils/bash/ast.ts:213–218  ·  view source on GitHub ↗
(nodeType: string | undefined)

Source from the content-addressed store, hash-verified

211 */
212const DANGEROUS_TYPE_IDS = [...DANGEROUS_TYPES]
213export function nodeTypeId(nodeType: string | undefined): number {
214 if (!nodeType) return -2
215 if (nodeType === 'ERROR') return -1
216 const i = DANGEROUS_TYPE_IDS.indexOf(nodeType)
217 return i >= 0 ? i + 1 : 0
218}
219
220/**
221 * Redirect operator tokens → canonical operator. tree-sitter produces these

Callers 1

bashToolHasPermissionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected