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

types: use WebRenderer type as new Addon_BaseAnnotations template variable #106

Merged
merged 3 commits into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { SvelteComponentTyped, SvelteComponent } from 'svelte';
import type { Addon_BaseMeta as BaseMeta, Addon_BaseAnnotations as BaseAnnotations, StoryContext } from '@storybook/types';
import type { Addon_BaseMeta as BaseMeta, Addon_BaseAnnotations as BaseAnnotations, StoryContext, WebRenderer } from '@storybook/types';


type DecoratorReturnType = void|SvelteComponent|{
type DecoratorReturnType = void | SvelteComponent | {
Component: any,
props?: any
}

interface StoryProps extends BaseAnnotations<any, DecoratorReturnType> {
interface StoryProps extends BaseAnnotations<any, DecoratorReturnType, WebRenderer> {
/**
* Id of the story.
*
Expand All @@ -32,7 +32,7 @@ interface StoryProps extends BaseAnnotations<any, DecoratorReturnType> {
* If source is true, then the source of the story will be used instead.
* If source is a string, it replaces the source of the story.
*/
source?: boolean|string
source?: boolean | string
}

interface TemplateProps extends BaseAnnotations<any, DecoratorReturnType> {
Expand All @@ -54,7 +54,7 @@ interface Slots {
/**
* Meta.
*/
export class Meta extends SvelteComponentTyped<BaseMeta<any> & BaseAnnotations<any, DecoratorReturnType>> {}
export class Meta extends SvelteComponentTyped<BaseMeta<any> & BaseAnnotations<any, DecoratorReturnType>> { }
/**
* Story.
*/
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"@storybook/svelte": "^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0",
"@storybook/svelte-webpack5": "^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0",
"@storybook/testing-library": "^0.0.13",
"@storybook/types": "^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0",
"auto": "^10.43.0",
"babel-jest": "^29.5.0",
"babel-loader": "^8.1.0",
Expand Down
15 changes: 15 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3263,6 +3263,11 @@
resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-7.0.0-rc.11.tgz#9f8d43f5a78e3d286b0399e0188beac32e9a10a5"
integrity sha512-MyY8tZPwCW9JjOvpFCDWZDqqnh0DnDt/iwOyFr9W4b5K/oGkTtZaVOMp0pq6nhjhDEOIp4p4MnSu/Sh1qZroKw==

"@storybook/[email protected]":
version "7.0.20"
resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-7.0.20.tgz#a681c3d463b4099b001dae9edeb3a607a8f4854a"
integrity sha512-AL5GGSQ8WTDUoh3gitKEzo3fu7Vq5okXq2pAknAZlQA2Oio+HHO5nMeXvOfGdvo/tzbpNE3n5utmCJz006xrCA==

"@storybook/[email protected]":
version "7.0.0-rc.11"
resolved "https://registry.yarnpkg.com/@storybook/cli/-/cli-7.0.0-rc.11.tgz#1ee39807173ffe5d6586b0bf8d487553b954b4d5"
Expand Down Expand Up @@ -3821,6 +3826,16 @@
"@types/express" "^4.7.0"
file-system-cache "^2.0.0"

"@storybook/types@^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0":
version "7.0.20"
resolved "https://registry.yarnpkg.com/@storybook/types/-/types-7.0.20.tgz#6aadc565f5894512b7f8da2aea9cac9448160519"
integrity sha512-Z7RhHRnhrPd2jXPZtjbOILj1QgylqlsD3cFIYMcSz3yvUvxLRx3BKCftXyFbIuxr0QoCJE38adRp7YGO9uJnQQ==
dependencies:
"@storybook/channels" "7.0.20"
"@types/babel__core" "^7.0.0"
"@types/express" "^4.7.0"
file-system-cache "^2.0.0"

"@szmarczak/http-timer@^4.0.5":
version "4.0.6"
resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807"
Expand Down