UNPKG

eslint-plugin-obsidian

Version:

ESLint rules for Obsidian

32 lines 1.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CallExpression = void 0; const identifier_1 = require("./identifier"); const generics_1 = require("./generics"); class CallExpression { constructor(node) { this.node = node; } isExpression(name) { return this.name === name; } get name() { return this.callee.name; } get arguments() { return this.node.arguments.map((arg) => new identifier_1.Identifier(arg)); } get generics() { var _a; // Support both typeParameters (@typescript-eslint v7+) and typeArguments (v6 and earlier) const typeParams = (_a = this.node.typeParameters) !== null && _a !== void 0 ? _a : this.node.typeArguments; return typeParams ? new generics_1.Generics(typeParams) : undefined; } get callee() { return this.node.callee; } } exports.CallExpression = CallExpression; //# sourceMappingURL=callExpression.js.map