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

Function bindFunctionOrConstructorType

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

Source from the content-addressed store, hash-verified

46395 return state;
46396 }
46397 function bindFunctionOrConstructorType(node) {
46398 // For a given function symbol "<...>(...) => T" we want to generate a symbol identical
46399 // to the one we would get for: { <...>(...): T }
46400 //
46401 // We do that by making an anonymous type literal symbol, and then setting the function
46402 // symbol as its sole member. To the rest of the system, this symbol will be indistinguishable
46403 // from an actual type literal symbol you would have gotten had you used the long form.
46404 var symbol = createSymbol(131072 /* SymbolFlags.Signature */, getDeclarationName(node)); // TODO: GH#18217
46405 addDeclarationToSymbol(symbol, node, 131072 /* SymbolFlags.Signature */);
46406 var typeLiteralSymbol = createSymbol(2048 /* SymbolFlags.TypeLiteral */, "__type" /* InternalSymbolName.Type */);
46407 addDeclarationToSymbol(typeLiteralSymbol, node, 2048 /* SymbolFlags.TypeLiteral */);
46408 typeLiteralSymbol.members = ts.createSymbolTable();
46409 typeLiteralSymbol.members.set(symbol.escapedName, symbol);
46410 }
46411 function bindObjectLiteralExpression(node) {
46412 var ElementKind;
46413 (function (ElementKind) {

Callers 1

bindWorkerFunction · 0.85

Calls 4

createSymbolFunction · 0.85
getDeclarationNameFunction · 0.85
addDeclarationToSymbolFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…