1
0
Fork 0

fix: require encoding overload for include read callback

This commit is contained in:
ssube 2020-07-09 06:40:08 -05:00
parent 24f32b922b
commit 6f5a4aa13e
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 3 additions and 1 deletions

View File

@ -2,9 +2,11 @@ import { InvalidArgumentError, NotFoundError } from '@apextoaster/js-utils';
import { SAFE_SCHEMA, safeLoad, Schema, Type as YamlType } from 'js-yaml';
import { join } from 'path';
export type IncludeReader = (path: string, options: { encoding: string }) => string;
export interface IncludeSchema {
exists: (path: string) => boolean;
read: (path: string, encoding: object) => string;
read: IncludeReader;
resolve: (path: string) => string;
schema: Schema;
}