The file `source.ts` contains a TypeScript module that classifies a
heterogeneous list of values using user-defined type predicates, then uses those
predicates to narrow and process the values.

Convert it to idiomatic Flow in `main.js`, preserving the runtime behavior and
keeping the refinements that the predicates provide. The result must pass
`flow check` with zero errors.
