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

CLI: Provide Typescript templates for Preact #21689

Open
wants to merge 6 commits into
base: next
Choose a base branch
from

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Mar 20, 2023

Closes #

What I did

The CLI only contained JS templates for Preact. This PR adds Typescript (and 4.9) to it.

How to test

  1. Run a sandbox for template, e.g. yarn task --task sandbox --start-from auto --template preact-vite/default-ts
  2. It should contain typescript stories

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]


export const LoggedIn: Story = {
args: {
// @ts-expect-error TODO seems like props extraction in Story type is not correct
Copy link
Member Author

Choose a reason for hiding this comment

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

@kasperpeulen could you assist on this one? Thanks <3

} satisfies Meta<typeof Header>;

export default meta;
type Story = StoryObj<typeof meta>;
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't support this yet in Preact!

Copy link
Contributor

Choose a reason for hiding this comment

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

Should be StoryObj<HeaderProps>

Copy link
Contributor

@kasperpeulen kasperpeulen left a comment

Choose a reason for hiding this comment

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

Not sure, if we should do this, maybe we should first make the types of Preact aligned with the other renderers.

@kasperpeulen kasperpeulen assigned yannbf and unassigned kasperpeulen Aug 4, 2023
@github-actions
Copy link
Contributor

Fails
🚫

PR is not labeled with one of: ["ci:normal","ci:merged","ci:daily","ci:docs"]

Generated by 🚫 dangerJS against 3239b5b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants