CRUDUI

Home > @polyspec/crudui-validator > FileLoader

FileLoader interface

Loads a normalized file key to its parsed document. Throws ComposeLoadError('REF_FILE_NOT_FOUND') when the key is absent — the engine relies on that exact code (an unresolved $ref is a load error, never valid:true).

Signature:

export interface FileLoader 

Methods

Method

Description

load(key)

Load the parsed document at the canonical key, or throw NOT_FOUND.

normalize(path, basepath)

Resolve path against basepath to the canonical key the map uses.