eslint-plugin-obsidian
Version:
ESLint rules for Obsidian
20 lines • 675 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MissingTypeError = void 0;
class MissingTypeError {
constructor(own, injected) {
this.own = own;
this.injected = injected;
this.isError = true;
}
getMessage() {
return `The call to injectComponent is missing prop types. It should be typed as: injectComponent<${this.getGenerics()}> `;
}
getGenerics() {
const own = this.own[0];
const injected = this.injected[0];
return own && injected ? `${own}, ${injected}` : own;
}
}
exports.MissingTypeError = MissingTypeError;
//# sourceMappingURL=missingTypeError.js.map