Skip to content

Commit

Permalink
Write test correctly to avoid confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
unional committed Nov 18, 2016
1 parent 133fbdf commit 5633fff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/typings-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ function createCustomAction(payload: CustomPayload): FluxStandardAction<CustomPa
}

function isCustomAction(action: FluxStandardAction<any, any>): action is FluxStandardAction<CustomPayload, any> {
return action.type === 'custom'
return isFSA(action) && action.type === 'custom'
}

function isCustomAction2(action: FluxStandardAction<any, any>): action is FluxStandardAction<CustomPayload, CustomMetadata> {
return action.type === 'custom2'
return isFSA(action) && action.type === 'custom2'
}

function isCustomAction3(action: any): action is FluxStandardAction<void, string> {
return action.type === 'custom3'
return isFSA(action) && action.type === 'custom3'
}

function reducer(state, action) {
Expand Down

0 comments on commit 5633fff

Please sign in to comment.