MCPcopy Index your code
hub / github.com/nodejs/node / getInitialTypeOfBindingElement

Function getInitialTypeOfBindingElement

test/fixtures/snapshot/typescript.js:69757–69766  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

69755 return errorType;
69756 }
69757 function getInitialTypeOfBindingElement(node) {
69758 var pattern = node.parent;
69759 var parentType = getInitialType(pattern.parent);
69760 var type = pattern.kind === 201 /* SyntaxKind.ObjectBindingPattern */ ?
69761 getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) :
69762 !node.dotDotDotToken ?
69763 getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) :
69764 getTypeOfDestructuredSpreadExpression(parentType);
69765 return getTypeWithDefault(type, node.initializer);
69766 }
69767 function getTypeOfInitializer(node) {
69768 // Return the cached type if one is available. If the type of the variable was inferred
69769 // from its initializer, we'll already have cached the type. Otherwise we compute it now

Callers 1

getInitialTypeFunction · 0.85

Calls 6

getInitialTypeFunction · 0.85
getTypeWithDefaultFunction · 0.85
indexOfMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…