cli: fix types.

Signed-off-by: Andreas Stenius <git@astekk.se>
This commit is contained in:
Andreas Stenius
2021-02-22 10:40:51 +01:00
parent 0e0d0595ea
commit 64a98b5fe6
4 changed files with 22 additions and 5 deletions
+5 -1
View File
@@ -15,6 +15,10 @@
*/
export { readEnvConfig, loadConfigSchema, mergeConfigSchemas } from './lib';
export type { ConfigSchema, ConfigVisibility } from './lib';
export type {
ConfigSchema,
ConfigSchemaPackageEntry,
ConfigVisibility,
} from './lib';
export { loadConfig } from './loader';
export type { LoadConfigOptions } from './loader';
@@ -72,7 +72,11 @@ export function compileConfigSchemas(
*/
export function mergeConfigSchemas(
schemas: ConfigSchemaPackageEntry[],
): { schema: JSONSchema; parser: Ajv } {
): {
schema: JSONSchema;
parser: Ajv;
visibilityByPath: Map<string, ConfigVisibility>;
} {
// The ajv instance below is stateful and doesn't really allow for additional
// output during validation. We work around this by having this extra piece
// of state that we reset before each validation.
@@ -16,4 +16,8 @@
export { mergeConfigSchemas } from './compile';
export { loadConfigSchema } from './load';
export type { ConfigSchema, ConfigVisibility } from './types';
export type {
ConfigSchema,
ConfigSchemaPackageEntry,
ConfigVisibility,
} from './types';