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

replace botbuilder-stdlib assertions with zod #3670

Closed
joshgummersall opened this issue May 11, 2021 · 0 comments · Fixed by #3859
Closed

replace botbuilder-stdlib assertions with zod #3670

joshgummersall opened this issue May 11, 2021 · 0 comments · Fixed by #3859
Assignees
Labels
Area: Engineering Internal issues that are related to improving code quality, refactorings, code cleanup, etc.

Comments

@joshgummersall
Copy link
Contributor

Now that we've properly exercised runtypes it's ready for primetime. It's more performant than botbuilder-stdlib assertions and more expressive.

We can use Guard<T>((val): val is T => ...) style guards for custom types or instance checks.

For argument validation, t.Record({argName: t.String}).check({argName}) will provide helpful contextual errors (labeled with argName).

@joshgummersall joshgummersall added the Area: Engineering Internal issues that are related to improving code quality, refactorings, code cleanup, etc. label May 11, 2021
@joshgummersall joshgummersall self-assigned this May 11, 2021
@joshgummersall joshgummersall changed the title replace botbuilder-stdlib assertions with runtypes replace botbuilder-stdlib assertions with zod Jun 25, 2021
joshgummersall pushed a commit that referenced this issue Jul 9, 2021
joshgummersall pushed a commit that referenced this issue Jul 9, 2021
joshgummersall pushed a commit that referenced this issue Jul 9, 2021
joshgummersall pushed a commit that referenced this issue Jul 9, 2021
joshgummersall pushed a commit that referenced this issue Jul 9, 2021
joshgummersall pushed a commit that referenced this issue Jul 9, 2021
stevengum pushed a commit that referenced this issue Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Engineering Internal issues that are related to improving code quality, refactorings, code cleanup, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant