fix: require encoding overload for include read callback
This commit is contained in:
parent
24f32b922b
commit
6f5a4aa13e
|
@ -2,9 +2,11 @@ import { InvalidArgumentError, NotFoundError } from '@apextoaster/js-utils';
|
||||||
import { SAFE_SCHEMA, safeLoad, Schema, Type as YamlType } from 'js-yaml';
|
import { SAFE_SCHEMA, safeLoad, Schema, Type as YamlType } from 'js-yaml';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
|
|
||||||
|
export type IncludeReader = (path: string, options: { encoding: string }) => string;
|
||||||
|
|
||||||
export interface IncludeSchema {
|
export interface IncludeSchema {
|
||||||
exists: (path: string) => boolean;
|
exists: (path: string) => boolean;
|
||||||
read: (path: string, encoding: object) => string;
|
read: IncludeReader;
|
||||||
resolve: (path: string) => string;
|
resolve: (path: string) => string;
|
||||||
schema: Schema;
|
schema: Schema;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue