Skip to content

Need an advice on string-to-number conversion in forms #2266

Answered by thegedge
OnkelTem asked this question in Q&A
Discussion options

You must be logged in to vote

So the generic parameters are:

You have two:

  1. S, the snapshot type, used for both inputs and outputs; and
  2. T, the "instance" type.

For a custom type C, you'll have the following:

  • SnapshotIn<C> == S | T
  • Instance<C> == T
  • SnapshotOut<C> == S

In other words, S is the same on the way in as it is on the way out. Product["prop"] should just be number, I believe.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@OnkelTem
Comment options

@OnkelTem
Comment options

@thegedge
Comment options

thegedge Apr 7, 2025
Collaborator

Answer selected by OnkelTem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants