1
0
Fork 0
js-yaml-schema/src/schema.ts

21 lines
485 B
TypeScript
Raw Normal View History

2019-11-13 14:01:51 +00:00
import { DEFAULT_SAFE_SCHEMA, Schema } from 'js-yaml';
import { envType } from './type/Env';
import { includeOptions, includeType } from './type/Include';
2019-11-13 14:01:51 +00:00
import { regexpType } from './type/Regexp';
import { streamType } from './type/Stream';
/**
* Safe schema with additional library types added.
*
* @public
*/
2019-11-13 14:01:51 +00:00
export const CONFIG_SCHEMA = Schema.create([DEFAULT_SAFE_SCHEMA], [
envType,
includeType,
regexpType,
streamType,
]);
includeOptions.schema = CONFIG_SCHEMA;