Skip to content

Commit 7c83bf6

Browse files
committed
🐛 Fix cli return type
1 parent de181ea commit 7c83bf6

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.changeset/fuzzy-chicken-agree.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'better-ajv-errors': patch
3+
---
4+
5+
:bug: Fix cli return type

typings.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ export default function <S, T, Options extends IInputOptions>(
2121
data: T,
2222
errors: Array<ErrorObject>,
2323
options?: Options
24-
): Options extends { format: 'js' } ? Array<IOutputError> : void;
24+
): Options extends { format: 'js' } ? Array<IOutputError> : string;

typings.test-d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {expectType} from 'tsd';
22
import betterAjvErrors, { IOutputError } from '.';
33

4-
expectType<void>(betterAjvErrors(true, false, []));
5-
expectType<void>(betterAjvErrors(true, false, [], { format: 'cli'}));
4+
expectType<string>(betterAjvErrors(true, false, []));
5+
expectType<string>(betterAjvErrors(true, false, [], { format: 'cli'}));
66

7-
expectType<Array<IOutputError>>(betterAjvErrors('foo', 'bar', [], { format: 'js'}));
7+
expectType<Array<IOutputError>>(betterAjvErrors('abc', 'xyz', [], { format: 'js'}));

0 commit comments

Comments
 (0)