Skip to content

Commit f60dce6

Browse files
docs: fix JSDoc content for Predicate.isNumber to match the implementation (#5478)
1 parent b07a6e9 commit f60dce6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/effect/src/Predicate.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,7 @@ export const isMap = (input: unknown): input is Map<unknown, unknown> => input i
334334
export const isString = (input: unknown): input is string => typeof input === "string"
335335

336336
/**
337-
* A refinement that checks if a value is a `number`. Note that this
338-
* check returns `false` for `NaN`.
337+
* A refinement that checks if a value is a `number`.
339338
*
340339
* @example
341340
* ```ts
@@ -345,9 +344,9 @@ export const isString = (input: unknown): input is string => typeof input === "s
345344
* assert.strictEqual(isNumber(123), true)
346345
* assert.strictEqual(isNumber(0), true)
347346
* assert.strictEqual(isNumber(-1.5), true)
347+
* assert.strictEqual(isNumber(NaN), true)
348348
*
349349
* assert.strictEqual(isNumber("123"), false)
350-
* assert.strictEqual(isNumber(NaN), false) // Special case: NaN is a number type but returns false
351350
* ```
352351
*
353352
* @category guards

0 commit comments

Comments
 (0)