import type { LimitedResource, Resource, } from "@src/component"; import { LitElement } from "lit"; export class ComponentObjectHandler extends LitElement { object?: LimitedResource = { "@id": "" }; isType = (type: string, obj: Resource = (this.object as Resource)) => { const typeValue = obj["@type"]; if (Array.isArray(typeValue)) { return typeValue.includes(type); } if (typeof typeValue === "string") { return typeValue === type; } return false; }; }