Skip to content

Instantly share code, notes, and snippets.

@shmurakami
shmurakami / index.ts
Created February 4, 2025 13:09
typescript match, result, option
import { Err, err, Ok, ok, type Result } from "neverthrow";
import { none, Option, some } from "ts-option";
import { match, P } from "ts-pattern";
type Foo = {
str: string;
some: Option<string>;
none: Option<string>;
};