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

fix(webcomponents): make types play nicely with lit-element #9557

Merged
merged 7 commits into from
Jan 29, 2020

Conversation

urish
Copy link
Contributor

@urish urish commented Jan 20, 2020

What I did

Before this change, returning html<sometag>...</sometag> from storiesOf(...).add would result in the following error: Type 'TemplateResult' is not assignable to type 'StoryFnHtmlReturnType'

Before this change, returning html`<sometag>...</sometag>` from `storiesOf(...).add` would result in the following error: Type 'TemplateResult' is not assignable to type 'StoryFnHtmlReturnType'
@vercel
Copy link

vercel bot commented Jan 20, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/storybook/monorepo/lnt7vsofn
✅ Preview: https://monorepo-git-fork-urish-patch-webcomponents-types.storybook.now.sh

@ndelangen
Copy link
Member

ndelangen commented Jan 20, 2020

I think we need a eslint-ignore-next-line rule for:

/tmp/*********/app/web-components/src/client/preview/types.ts
  2:1  error  'lit-element' should be listed in the project's dependencies. Run 'npm i -S lit-element' to add it  import/no-extraneous-dependencies

@urish
Copy link
Contributor Author

urish commented Jan 21, 2020

@ndelangen do you want me to amend the pull request and add this?

@ndelangen ndelangen self-assigned this Jan 21, 2020
@vercel vercel bot temporarily deployed to Preview January 21, 2020 11:07 Inactive
@ndelangen
Copy link
Member

ndelangen commented Jan 21, 2020

I read: "would you please amend the PR", so I went ahead and did it.

Thanks for the PR @urish!

@ndelangen ndelangen added this to the 5.3.x milestone Jan 21, 2020
@ndelangen ndelangen added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Jan 21, 2020
@urish
Copy link
Contributor Author

urish commented Jan 21, 2020

Even better :-)

p.s. you can see it in action here: https://elements.wokwi.com/
source code: https://github.com/wokwi/wokwi-elements

@vercel vercel bot temporarily deployed to Preview January 21, 2020 15:06 Inactive
@ndelangen ndelangen merged commit 544091d into storybookjs:next Jan 29, 2020
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Feb 2, 2020
shilman pushed a commit that referenced this pull request Feb 2, 2020
fix(webcomponents): make types play nicely with lit-element
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch typescript web-components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants