Defensive Typing for Third-Party Code in TypeScript
Hi all! In my project, I'm going to be importing some third-party code that should evaluate to an
I'm thinking about writing a function that looks like this, but I'm not sure of the best way to do that:
Is this just a silly effort?
Is there something in
I'm lost trying to figure out a way to validate such code
Effect<SomeKnownShape, unknown, unknown>, and want to be defensive about types.I'm thinking about writing a function that looks like this, but I'm not sure of the best way to do that:
Is this just a silly effort?
Is there something in
@effect/schema that could help with this (it seems those are more geared towards validating primitives and objects)?I'm lost trying to figure out a way to validate such code
