(input: Input)
| 178 | .run(); |
| 179 | |
| 180 | const exhaustive = (input: Input) => |
| 181 | match<Input>(input) |
| 182 | .with(null, undefined, (x) => 'Nullable') |
| 183 | .with(P.boolean, P.number, P.string, (x) => 'primitive') |
| 184 | .with( |
| 185 | { a: P.string }, |
| 186 | [true, 2], |
| 187 | P.map(P.string, P._), |
| 188 | P.set(P.number), |
| 189 | (x) => 'Object' |
| 190 | ) |
| 191 | .with([false, 2], (x) => '[false, 2]') |
| 192 | .with([false, P.number], (x) => '[false, number]') |
| 193 | .with([true, P.number], (x) => '[true, number]') |
| 194 | .exhaustive(); |
| 195 | |
| 196 | const cases: { input: Input; expected: string }[] = [ |
| 197 | { input: null, expected: 'Nullable' }, |
no test coverage detected
searching dependent graphs…