diff --git a/AppTest.js b/AppTest.js index cd74cfd..63c4bdf 100644 --- a/AppTest.js +++ b/AppTest.js @@ -17,7 +17,8 @@ const { InteractiveOptions } = require ('./dist/lib/index.js'); { name: 'str', type: 'string', env: 'TEST_STR' }, { name: 'bool', type: 'boolean', env: 'TEST_BOOL' }, { name: 'num', type: 'number', env: 'TEST_NUM' }, - { name: 'arr', type: 'array', env: 'TEST_ARR' } + { name: 'arr', type: 'array', env: 'TEST_ARR' }, + { name: 'fld', type: 'folder', env: 'TEST_FOLDER' } ]); await reader.parse (); console.log (reader.serialize (true)); diff --git a/lib/Types/PathType.ts b/lib/Types/PathType.ts index 1d02a8e..0530a78 100644 --- a/lib/Types/PathType.ts +++ b/lib/Types/PathType.ts @@ -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 { if (typeof value !== 'string') throw new Error (`invalid type for ${this.option_type}`);