Avoid throwing for expected failures in TypeScript

Use Result in TypeScript for expected failures, Maybe for absence, and reserve exceptions for truly exceptional situations.