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

Function checkFixedAssignableTo

test/fixtures/snapshot/typescript.js:154528–154545  ·  view source on GitHub ↗
(checker, declaration, exprType, type, isFunctionType)

Source from the content-addressed store, hash-verified

154526 return undefined;
154527 }
154528 function checkFixedAssignableTo(checker, declaration, exprType, type, isFunctionType) {
154529 if (isFunctionType) {
154530 var sig = checker.getSignatureFromDeclaration(declaration);
154531 if (sig) {
154532 if (ts.hasSyntacticModifier(declaration, 256 /* ModifierFlags.Async */)) {
154533 exprType = checker.createPromiseType(exprType);
154534 }
154535 var newSig = checker.createSignature(declaration, sig.typeParameters, sig.thisParameter, sig.parameters, exprType,
154536 /*typePredicate*/ undefined, sig.minArgumentCount, sig.flags);
154537 exprType = checker.createAnonymousType(
154538 /*symbol*/ undefined, ts.createSymbolTable(), [newSig], [], []);
154539 }
154540 else {
154541 exprType = checker.getAnyType();
154542 }
154543 }
154544 return checker.isTypeAssignableTo(exprType, type);
154545 }
154546 function getInfo(checker, sourceFile, position, errorCode) {
154547 var node = ts.getTokenAtPosition(sourceFile, position);
154548 if (!node.parent)

Callers 1

getFixInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected