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

Function getWriteTypeOfSymbol

test/fixtures/snapshot/typescript.js:56875–56890  ·  view source on GitHub ↗

* Distinct write types come only from set accessors, but synthetic union and intersection * properties deriving from set accessors will either pre-compute or defer the union or * intersection of the writeTypes of their constituents.

(symbol)

Source from the content-addressed store, hash-verified

56873 * intersection of the writeTypes of their constituents.
56874 */
56875 function getWriteTypeOfSymbol(symbol) {
56876 var checkFlags = ts.getCheckFlags(symbol);
56877 if (symbol.flags & 4 /* SymbolFlags.Property */) {
56878 return checkFlags & 2 /* CheckFlags.SyntheticProperty */ ?
56879 checkFlags & 65536 /* CheckFlags.DeferredType */ ?
56880 getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) :
56881 symbol.writeType || symbol.type :
56882 getTypeOfSymbol(symbol);
56883 }
56884 if (symbol.flags & 98304 /* SymbolFlags.Accessor */) {
56885 return checkFlags & 1 /* CheckFlags.Instantiated */ ?
56886 getWriteTypeOfInstantiatedSymbol(symbol) :
56887 getWriteTypeOfAccessors(symbol);
56888 }
56889 return getTypeOfSymbol(symbol);
56890 }
56891 function getTypeOfSymbol(symbol) {
56892 var checkFlags = ts.getCheckFlags(symbol);
56893 if (checkFlags & 65536 /* CheckFlags.DeferredType */) {

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…