Skip to content
Discussion options

You must be logged in to vote

Hello @Utopianii , thank you for the question.

Short answer: please use string for now.

I was also researching the similar question and here I'm ready to share my results with you.

  1. The schema validation library (Zod) does not have a special type for describing a stream. At least yet. So the easiest way to do it right now is to use z.string() (ZodString type). In theory, it's possible to create a custom type by inheriting from ZodType<> generic inferring ReadableStream, and implementing own _parse() method for validation, but I decided that this is an unnecessary complication at this stage.
  2. At the same time talking about creating a specification and a documentation of an API, according to…

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by RobinTail
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #75 on July 19, 2021 18:06.