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

17 lines
No EOL
587 B
Text

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDeclaration = void 0;
/**
* Gets the declaration for the given variable
*/
function getDeclaration(checker, node) {
var _a;
const symbol = checker.getSymbolAtLocation(node);
if (!symbol) {
return null;
}
const declarations = symbol.getDeclarations();
return (_a = declarations === null || declarations === void 0 ? void 0 : declarations[0]) !== null && _a !== void 0 ? _a : null;
}
exports.getDeclaration = getDeclaration;
//# sourceMappingURL=getDeclaration.js.map