arktypeio/arktype

Pipes pass original object in some cases

Closed this issue · 1 comments

Report a bug

🧩 Context

  • ArkType version: rc18

🧑‍💻 Repro

export const $ = scope({
  From: { a: ['1', '=>', () => 2] },
  Morph: ['From', '=>', e => e],
  To: { a: '2' },
}).export()

console.log(
  $.Morph.pipe(e => e).pipe($.To).assert({ a: 1 }),
)
// error: a must be 2 (was 1)

Fixed by #1183