Skip to content

Commit

Permalink
Merge pull request #106 from specialdoom/type/update-types
Browse files Browse the repository at this point in the history
types: use `WebRenderer` type as new `Addon_BaseAnnotations` template variable
  • Loading branch information
JReinhold authored Jun 9, 2023
2 parents 3f963e7 + 870d3b7 commit aef414b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
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

0 comments on commit aef414b

Please sign in to comment.