import { expectError, expectType } from 'tsd' import { command, errors } from '.' import { FastifyError } from '@fastify/error' // command expectType>(command([])) expectType>(command(['foo', 'bar'])) expectError>(command(false)) expectError>(command([4, 2])) // errors expectType(errors.TypeNotSupportedError('someType')) expectType(errors.UnknownTypeError('otherType')) expectError(errors.TypeNotSupportedError()) expectError(errors.UnknownTypeError())