Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out ignores inner morphs on types with morphs #1173

Closed
Dimava opened this issue Oct 11, 2024 · 2 comments
Closed

Out ignores inner morphs on types with morphs #1173

Dimava opened this issue Oct 11, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Dimava
Copy link
Contributor

Dimava commented Oct 11, 2024

Report a bug

🧩 Context

  • ArkType version: rc15

πŸ§‘β€πŸ’» Repro

console.log(
  type({
    foo: type('string').pipe(() => 123),
  })
  .pipe(c => c)
  .to({
    foo: '123',
  })
({
  foo: 'bar',
})+'')
// foo must be 123 (was "bar")
@Dimava Dimava added the bug Something isn't working label Oct 11, 2024
@github-project-automation github-project-automation bot moved this to To do in arktypeio Oct 11, 2024
@Dimava
Copy link
Contributor Author

Dimava commented Oct 12, 2024

const _pipeMorphed = (...) => 
	return ctx.$.node("morph", {
		morphs,
		in: from.in
	})

This uses .in which drops prop morphs

@ssalbdivad
Copy link
Member

Fixed by you in #1174 πŸ’ͺ

@github-project-automation github-project-automation bot moved this from To do to Done (merged or closed) in arktypeio Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done (merged or closed)
Development

No branches or pull requests

2 participants