Skip to content

Commit

Permalink
Merge pull request #468 from liao02x/patch-1
Browse files Browse the repository at this point in the history
fix signature for whenXX functions
  • Loading branch information
dilanx authored Nov 13, 2022
2 parents 046dd50 + c64f10a commit 4e7e363
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions website/docs/configuration/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,19 @@ module.exports = {
If `condition` evaluates to true, `fn` is called and the helper will return what that function returns. If false, `unmetValue` will be returned (or `undefined` if not provided).
#### `whenDev(condition, fn, [unmetValue])`
#### `whenDev(fn, [unmetValue])`
`whenDev<T>(fn: () => T, unmetValue?: T): T | undefined`
Equivalent to `when(process.env.NODE_ENV === 'development', fn, unmetValue)`.
#### `whenProd(condition, fn, [unmetValue])`
#### `whenProd(fn, [unmetValue])`
`whenProd<T>(fn: () => T, unmetValue?: T): T | undefined`
Equivalent to `when(process.env.NODE_ENV === 'production', fn, unmetValue)`.
#### `whenTest(condition, fn, [unmetValue])`
#### `whenTest(fn, [unmetValue])`
`whenTest<T>(fn: () => T, unmetValue?: T): T | undefined`
Expand Down

0 comments on commit 4e7e363

Please sign in to comment.