LoadResult
Copy as MarkdownLoadResult = {
error?:undefined;file:RupaFile; } | {error:FileError;file?:undefined; }
What loadFile resolves to: { file }, the validated file, or { error }. Exactly one of the two is set.
Example
Section titled “Example”const result = await loadFile(url);if (result.error) console.warn(result.error.code, result.error.message);else console.log(result.file.root);