Skip to content

Commit

Permalink
feat(action): typings expect-error if no error field
Browse files Browse the repository at this point in the history
  • Loading branch information
tvanier committed Oct 21, 2019
1 parent 6588fea commit 987bdef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions type-tests/files/createAction.typetest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ function expectType<T>(p: T): T {
// typings:expect-error
expectType<string>(strLenAction('test').payload)
// typings:expect-error
expectType<boolean>(strLenAction('test').error)
const error: any = strLenAction('test').error
}

/*
Expand All @@ -174,7 +174,7 @@ function expectType<T>(p: T): T {
// typings:expect-error
expectType<string>(strLenMetaAction('test').meta)
// typings:expect-error
expectType<boolean>(strLenMetaAction('test').error)
const error: any = strLenMetaAction('test').error
}

/*
Expand Down

0 comments on commit 987bdef

Please sign in to comment.