MCPcopy
hub / github.com/gvergnaud/ts-pattern / otherwise

Method otherwise

src/match.ts:110–113  ·  view source on GitHub ↗
(handler: (value: input) => output)

Source from the content-addressed store, hash-verified

108 }
109
110 otherwise(handler: (value: input) => output): output {
111 if (this.state.matched) return this.state.value;
112 return handler(this.input);
113 }
114
115 exhaustive(unexpectedValueHandler = defaultCatcher): output {
116 if (this.state.matched) return this.state.value;

Callers 15

record.test.tsFile · 0.80
matchResultFunction · 0.80
fFunction · 0.80
fFunction · 0.80
fFunction · 0.80
f2Function · 0.80
f3Function · 0.80
objects.test.tsFile · 0.80
types.test.tsFile · 0.80
fFunction · 0.80

Calls

no outgoing calls

Tested by 15

matchResultFunction · 0.64
fFunction · 0.64
fFunction · 0.64
fFunction · 0.64
f2Function · 0.64
f3Function · 0.64
fFunction · 0.64
fFunction · 0.64
fFunction · 0.64
fnFunction · 0.64
mapFunction · 0.64
fFunction · 0.64