Replies: 1 comment
|
@{number=1607; body=For this use case, please use
The docs cover this under Closing this as answered by the reflection API.}.body |
|
@{number=1607; body=For this use case, please use
The docs cover this under Closing this as answered by the reflection API.}.body |
Uh oh!
There was an error while loading. Please reload this page.
I'm currently using zod, but like the idea of using types only for my project.
So far every thing would work, but I would need to be able to mark properties, so I can identify them at runtime.
My specific usecase is that I have a schema for a db-event in event-sourcing, but want to mark specific fields as PII (Personal Identifiable Data) to be able to store these fields in another store and only the reference to them to the event-stream.
For that to be possible I need the information at runtime.
I currently see two possible solutions:
While 1 would be optimal in usage, I doubt that this is a good idea, since a
ischeck should not alter anything and be pure.The second approach is a bit more work, and has the challenge of union and array types, but would be pure and does not alter anything.
A possible api:
What is your opinion on that?
All reactions