eslint-plugin-obsidian
Version:
ESLint rules for Obsidian
27 lines • 767 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TypeReference = void 0;
const lodash_1 = require("lodash");
const identifier_1 = require("../identifier");
class TypeReference {
constructor(node) {
this.node = node;
}
toString() {
return [new identifier_1.Identifier(this.node.typeName).name];
}
isEmpty() {
return false;
}
equals(types) {
return (0, lodash_1.isEqual)(this.toString(), types.map((type) => type.toString()).flat());
}
includes(type) {
return type.some((t) => (0, lodash_1.isEqual)(this.toString(), t.toString()));
}
size() {
return 1;
}
}
exports.TypeReference = TypeReference;
//# sourceMappingURL=typeReference.js.map