Skip to content

Conversation

@dreyfus92
Copy link
Member

this is an attempt to work on the docs for clack 🫡

@changeset-bot
Copy link

changeset-bot bot commented Mar 18, 2025

⚠️ No Changeset found

Latest commit: a0a582a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 18, 2025

Open in Stackblitz@example/basic@example/changesets

npm i https://pkg.pr.new/bombshell-dev/clack/@clack/core@249
npm i https://pkg.pr.new/bombshell-dev/clack/@clack/prompts@249

commit: ef328ef

@dreyfus92 dreyfus92 marked this pull request as ready for review March 19, 2025 02:15
@dreyfus92 dreyfus92 changed the title docs init (WIP) docs: Initial documentation structure and baseline content Mar 19, 2025
const name = await text({
message: 'What is your name?',
placeholder: 'John Doe',
}) as string;
Copy link
Collaborator

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

text | symbol

Copy link
Collaborator

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

Copy link
Member Author

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',
Copy link
Collaborator

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same issue here 🫠

@43081j
Copy link
Collaborator

43081j commented Mar 20, 2025

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

@dreyfus92
Copy link
Member Author

closing in favor of moving the docs to it's own repo 😁

@dreyfus92 dreyfus92 closed this Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants