Skip to main content

Type Alias: ResourceReader

ResourceReader = (relativePath) => Promise<Uint8Array>

Reads the bytes of a resource referenced by a document, given its normalized root-relative POSIX path. Callers supply this so the library never touches a filesystem itself: the Node entry point wraps fs.readFile, a browser can serve entries from an unzipped archive.

Parameters​

relativePath​

string

Returns​

Promise<Uint8Array>