you can just to

    default:
        matched satisfies never
        throw new Error(...)
You don't even need a function.