Urara-Blog/node_modules/.pnpm-store/v3/files/31/a399a4cccac3a508b91643627ffb5f3c1d61147e632827a8111d720acf7a7f1b1883d58b2556e814d61be1146fec307a19dedd1a255453525c709eef0cf20e
2022-08-14 01:14:53 +08:00

13 lines
No EOL
616 B
Text

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getConstrainedTypeAtLocation = void 0;
/**
* Resolves the given node's type. Will resolve to the type's generic constraint, if it has one.
*/
function getConstrainedTypeAtLocation(checker, node) {
const nodeType = checker.getTypeAtLocation(node);
const constrained = checker.getBaseConstraintOfType(nodeType);
return constrained !== null && constrained !== void 0 ? constrained : nodeType;
}
exports.getConstrainedTypeAtLocation = getConstrainedTypeAtLocation;
//# sourceMappingURL=getConstrainedTypeAtLocation.js.map