Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/ts_matches/src/matches.ts>Parser#map

Being able to pattern match in typescript
Go to Latest
method Parser.prototype.map
Re-export
import { Parser } from "https://deno.land/x/ts_matches@v5.2.1/src/matches.ts";

Use this that we want to do transformations after the value is valid and parsed. A use case would be parsing a string, making sure it can be parsed to a number, and then convert to a number

Parameters

fn: (apply: B) => C
optional
mappingName: string