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

Function getWriteTypeOfAccessors

test/fixtures/snapshot/typescript.js:56731–56749  ·  view source on GitHub ↗
(symbol)

Source from the content-addressed store, hash-verified

56729 return links.type;
56730 }
56731 function getWriteTypeOfAccessors(symbol) {
56732 var links = getSymbolLinks(symbol);
56733 if (!links.writeType) {
56734 if (!pushTypeResolution(symbol, 8 /* TypeSystemPropertyName.WriteType */)) {
56735 return errorType;
56736 }
56737 var setter = ts.getDeclarationOfKind(symbol, 173 /* SyntaxKind.SetAccessor */);
56738 var writeType = getAnnotatedAccessorType(setter);
56739 if (!popTypeResolution()) {
56740 if (getAnnotatedAccessorTypeNode(setter)) {
56741 error(setter, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
56742 }
56743 writeType = anyType;
56744 }
56745 // Absent an explicit setter type annotation we use the read type of the accessor.
56746 links.writeType = writeType || getTypeOfAccessors(symbol);
56747 }
56748 return links.writeType;
56749 }
56750 function getBaseTypeVariableOfClass(symbol) {
56751 var baseConstructorType = getBaseConstructorTypeOfClass(getDeclaredTypeOfClassOrInterface(symbol));
56752 return baseConstructorType.flags & 8650752 /* TypeFlags.TypeVariable */ ? baseConstructorType :

Callers 2

getWriteTypeOfSymbolFunction · 0.85

Calls 8

getSymbolLinksFunction · 0.85
pushTypeResolutionFunction · 0.85
getAnnotatedAccessorTypeFunction · 0.85
popTypeResolutionFunction · 0.85
symbolToStringFunction · 0.85
getTypeOfAccessorsFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected