(t: Type)
| 410 | } |
| 411 | |
| 412 | export function nonNullTypeCases(t: Type): OrderedSet<Type> { |
| 413 | if (t.kind === "null") { |
| 414 | return OrderedSet(); |
| 415 | } |
| 416 | if (!(t instanceof UnionType)) { |
| 417 | return OrderedSet([t]); |
| 418 | } |
| 419 | const nonNulls = removeNullFromUnion(t)[1]; |
| 420 | return OrderedSet(nonNulls); |
| 421 | } |
| 422 | |
| 423 | // FIXME: The outer OrderedSet should be some Collection, but I can't figure out |
| 424 | // which one. Collection.Indexed doesn't work with OrderedSet, which is unfortunate. |
no test coverage detected
searching dependent graphs…