salve-annos
Version:
A fork with support for documentation of Salve, a Javascript library which implements a validator able to validate an XML document on the basis of a subset of RelaxNG.
19 lines (18 loc) • 594 B
TypeScript
import { Resource, ResourceLoader } from "../resource-loader";
export declare class NodeResource implements Resource {
readonly url: URL;
private readonly text;
constructor(url: URL, text: string);
getText(): Promise<string>;
}
/**
* A resource loader that loads resources using Node's ``fs`` facilities or
* ``fetch``.
*
* URLs with the file: protocol are loaded through Node's ``fs``
* facilities. Otherwise, fetch is used.
*/
export declare class NodeResourceLoader implements ResourceLoader {
private readonly fetchLoader;
load(url: URL): Promise<Resource>;
}