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

Function getObjectLiteralIndexInfo

test/fixtures/snapshot/typescript.js:73490–73502  ·  view source on GitHub ↗
(node, offset, properties, keyType)

Source from the content-addressed store, hash-verified

73488 isTypeAssignableToKind(checkComputedPropertyName(firstDecl.name), 4096 /* TypeFlags.ESSymbol */));
73489 }
73490 function getObjectLiteralIndexInfo(node, offset, properties, keyType) {
73491 var propTypes = [];
73492 for (var i = offset; i < properties.length; i++) {
73493 var prop = properties[i];
73494 if (keyType === stringType && !isSymbolWithSymbolName(prop) ||
73495 keyType === numberType && isSymbolWithNumericName(prop) ||
73496 keyType === esSymbolType && isSymbolWithSymbolName(prop)) {
73497 propTypes.push(getTypeOfSymbol(properties[i]));
73498 }
73499 }
73500 var unionType = propTypes.length ? getUnionType(propTypes, 2 /* UnionReduction.Subtype */) : undefinedType;
73501 return createIndexInfo(keyType, unionType, isConstContext(node));
73502 }
73503 function getImmediateAliasedSymbol(symbol) {
73504 ts.Debug.assert((symbol.flags & 2097152 /* SymbolFlags.Alias */) !== 0, "Should only get Alias here.");
73505 var links = getSymbolLinks(symbol);

Callers 1

createObjectLiteralTypeFunction · 0.85

Calls 7

isSymbolWithSymbolNameFunction · 0.85
isSymbolWithNumericNameFunction · 0.85
getTypeOfSymbolFunction · 0.85
getUnionTypeFunction · 0.85
createIndexInfoFunction · 0.85
isConstContextFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected