UNPKG

eslint-plugin-obsidian

Version:

ESLint rules for Obsidian

29 lines 788 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TypeLiteral = void 0; const lodash_1 = require("lodash"); class TypeLiteral { constructor() { this.name = (0, lodash_1.uniqueId)('TypeLiteral'); } static isTypeLiteral(type) { return type instanceof TypeLiteral; } toString() { return [this.name]; } isEmpty() { throw new Error('Method not implemented.'); } equals(types) { return types.length === 1 && types[0].toString() === this.toString(); } includes(type) { return type.every((t) => (0, lodash_1.isEqual)(t.toString(), this.toString())); } size() { return 1; } } exports.TypeLiteral = TypeLiteral; //# sourceMappingURL=typeLiteral.js.map