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

Function getSpreadSymbol

test/fixtures/snapshot/typescript.js:62998–63010  ·  view source on GitHub ↗
(prop, readonly)

Source from the content-addressed store, hash-verified

62996 !((_a = prop.declarations) === null || _a === void 0 ? void 0 : _a.some(function (decl) { return ts.isClassLike(decl.parent); })));
62997 }
62998 function getSpreadSymbol(prop, readonly) {
62999 var isSetonlyAccessor = prop.flags & 65536 /* SymbolFlags.SetAccessor */ && !(prop.flags & 32768 /* SymbolFlags.GetAccessor */);
63000 if (!isSetonlyAccessor && readonly === isReadonlySymbol(prop)) {
63001 return prop;
63002 }
63003 var flags = 4 /* SymbolFlags.Property */ | (prop.flags & 16777216 /* SymbolFlags.Optional */);
63004 var result = createSymbol(flags, prop.escapedName, getIsLateCheckFlag(prop) | (readonly ? 8 /* CheckFlags.Readonly */ : 0));
63005 result.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop);
63006 result.declarations = prop.declarations;
63007 result.nameType = getSymbolLinks(prop).nameType;
63008 result.syntheticOrigin = prop;
63009 return result;
63010 }
63011 function getIndexInfoWithReadonly(info, readonly) {
63012 return info.isReadonly !== readonly ? createIndexInfo(info.keyType, info.type, readonly, info.declaration) : info;
63013 }

Callers 2

getRestTypeFunction · 0.85
getSpreadTypeFunction · 0.85

Calls 5

isReadonlySymbolFunction · 0.85
createSymbolFunction · 0.85
getIsLateCheckFlagFunction · 0.85
getTypeOfSymbolFunction · 0.85
getSymbolLinksFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…