import {Canonical} from "./Canonical"; export class CanonicalRecursive extends Canonical { public get(key: string, fallback?: any): any | undefined { const parts = key.split('.') let currentValue = this.loadedItems for ( const part of parts ) { currentValue = currentValue?.[part] } return currentValue ?? fallback } }