parseNumber
parseNumber<
S
,A
>(self
):transformOrFail
<S
, typeofNumber$
>
Defined in: node_modules/.pnpm/effect@3.14.8/node_modules/effect/dist/dts/Schema.d.ts:2859
Transforms a string
into a number
by parsing the string using the parse
function of the effect/Number
module.
It returns an error if the value can’t be converted (for example when non-numeric characters are provided).
The following special string values are supported: “NaN”, “Infinity”, “-Infinity”.
Type Parameters
• S extends Any
• A extends string
Parameters
self
S
& Schema
<A
, Encoded
<S
>, Context
<S
>>
Returns
transformOrFail
<S
, typeof Number$
>
Since
3.10.0