-
Notifications
You must be signed in to change notification settings - Fork 161
docs: Initial documentation structure and baseline content #249
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
Conversation
|
|
Open in Stackblitz • @example/basic • @example/changesets commit: |
| const name = await text({ | ||
| message: 'What is your name?', | ||
| placeholder: 'John Doe', | ||
| }) as string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it not a string by default? what does text resolve to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
text | symbol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is, but if you use isCancel, it should narrow to string i think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i had to force the type cast, it wasn't able to infer it for some reason 😭
| return { | ||
| port: Number(port), | ||
| host, | ||
| mode: String(mode) as 'development' | 'production', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should actually be inferred. i think select resolves to symbol | 'development' | 'production' in this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same issue here 🫠
|
looks good to me there's a few places where you cast in examples and i suspect you don't need to 👀 but other than that this is great |
|
closing in favor of moving the docs to it's own repo 😁 |
this is an attempt to work on the docs for clack 🫡