This commit is contained in:
2020-05-18 11:03:49 +02:00
parent 2c8ad31ff0
commit cee181caeb
2 changed files with 6 additions and 1 deletions

View File

@ -13,6 +13,10 @@ export class PathType extends TypeValidation {
return 'string';
}
public get persistent_type (): 'string'|'number'|'boolean'|'array' {
return 'string';
}
public async to_type (value: unknown): Promise<unknown> {
if (typeof value !== 'string')
throw new Error (`invalid type for ${this.option_type}`);