Skip to content

Throwing in S.transform isn't caught #127

@chenglou

Description

@chenglou
const a = S.string.with(S.transform, () => {
  throw new Error('hi')
})
S.safe(() => S.parseOrThrow('', a))
❯ bun test.ts 
1 | import * as S from 'sury'
2 | 
3 | const a = S.string.with(S.transform, () => {
4 |   throw new Error('hi')
            ^
error: hi
      at <anonymous> (...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv11Features planned for the v11 version

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions