Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Schniz/cmd-ts. 💻 A type-driven command line argument parser cmd-ts.now.sh
Something went wrong. Try again.
123456789101112131415import { getTypes } from 'infer-types';import path from 'path';
test('types are inferred correctly', () => { const filepath = path.join(__dirname, '../example/app.ts'); const types = getTypes(filepath); expect(types).toEqual({ 'cat -> stream': 'Stream', 'complex -> intOrString': 'string | number', 'greet -> greeting': 'string', 'greet -> name': 'string', 'greet -> noExclaim': 'boolean', });});