node: added fileloader to LoadData. (#6530)

This commit is contained in:
FloVanGH 2024-10-14 07:33:42 +02:00 committed by GitHub
parent f8f1d468a0
commit fe596179da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 103 additions and 0 deletions

View file

@ -247,6 +247,11 @@ export interface LoadFileOptions {
* Sets library paths used for looking up `@library` imports to the specified map of library names to paths.
*/
libraryPaths?: Record<string, string>;
/**
* @hidden
*/
fileLoader?: (path: string) => string;
}
type LoadData =
@ -285,6 +290,9 @@ function loadSlint(loadData: LoadData): Object {
if (typeof options.libraryPaths !== "undefined") {
compiler.libraryPaths = options.libraryPaths;
}
if (typeof options.fileLoader !== "undefined") {
compiler.fileLoader = options.fileLoader;
}
}
const definitions =