Skip to content

Function: tryParse() ​

ts
function tryParse<I, R>(fn, input): R | null;

Defined in: parser/parsers.ts:57

Calls fn with input and returns the result, or warns and returns null when it throws.

Type Parameters ​

Type Parameter
I
R

Parameters ​

ParameterType
fn(input) => R
inputI

Returns ​

R | null

Released under the MIT License.