The file `source.ts` contains a TypeScript program that defines two unrelated
classes for observability samples and formats instances of either one through a
shared helper that reads their common fields.

Convert it to idiomatic Flow in `main.js`, preserving the runtime behavior.
