import {expectType, expectError} from 'tsd'; import dargs from './index.js'; const object = { _: ['some', 'option'], foo: 'bar', hello: true, cake: false, camelCase: 5, multiple: ['value', 'value2'], pieKind: 'cherry', sad: ':(' }; const excludes = ['sad', /.*Kind$/]; const includes = ['camelCase', 'multiple', 'sad', /^pie.*/]; const aliases = {file: 'f'}; expectType(dargs(object, {excludes})); expectType(dargs(object, {includes})); expectType(dargs(object, {aliases})); expectType(dargs(object, {useEquals: false})); expectType(dargs(object, {shortFlag: true})); expectType(dargs(object, {ignoreTrue: true})); expectType(dargs(object, {ignoreFalse: true})); expectType(dargs(object, {allowCamelCase: true})); expectError(dargs({_: 'foo'})); expectError(dargs({'--': 'foo'}));