You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Incorrect use of indexed properties resulting in TS2411 downstream when included by tsc.
Trying to upgrade to 5.1.3 and my typescript based monorepo fails on definitions produced by @storybook/api, specifically ts(2411):
$ /Users/kross/projects/js/node_modules/.bin/tsc -b
../../node_modules/@storybook/api/dist/modules/versions.d.ts:12:9 - error TS2411: Property 'latest' of type 'Version | undefined' is not assignable to string index type '{ [key: string]: any; }'.
12 latest?: Version;
~~~~~~
../../node_modules/@storybook/api/dist/modules/versions.d.ts:13:9 - error TS2411: Property 'next' of type 'Version | undefined' is not assignable to string index type '{ [key: string]: any; }'.
13 next?: Version;
~~~~
../../node_modules/@storybook/api/dist/modules/versions.d.ts:14:9 - error TS2411: Property 'current' of type 'Version | undefined' is not assignable to string index type '{ [key: string]: any; }'.
14 current?: Version;
~~~~~~~
../../node_modules/@storybook/api/dist/index.d.ts:61:13 - error TS2411: Property 'latest' of type 'Version | undefined' is not assignable to string index type '{ [key: string]: any; }'.
61 latest?: import("./modules/versions").Version;
~~~~~~
../../node_modules/@storybook/api/dist/index.d.ts:62:13 - error TS2411: Property 'next' of type 'Version | undefined' is not assignable to string index type '{ [key: string]: any; }'.
62 next?: import("./modules/versions").Version;
~~~~
../../node_modules/@storybook/api/dist/index.d.ts:63:13 - error TS2411: Property 'current' of type 'Version | undefined' is not assignable to string index type '{ [key: string]: any; }'.
63 current?: import("./modules/versions").Version;
To Reproduce
Steps to reproduce the behavior:
create a typescript project
yarn add @storybook#addon-actions which will transitively give you @storybook/api
tsc -b
Expected behavior
No typescript errors from published files
Describe the bug
Incorrect use of indexed properties resulting in TS2411 downstream when included by tsc.
Trying to upgrade to 5.1.3 and my typescript based monorepo fails on definitions produced by @storybook/api, specifically ts(2411):
To Reproduce
Steps to reproduce the behavior:
yarn add @storybook#addon-actions
which will transitively give you@storybook/api
tsc -b
Expected behavior
No typescript errors from published files
Screenshots
Code snippets
n/a
System:
Additional context
[email protected]
Specifically,
Version
is not the same type as the indexer.The text was updated successfully, but these errors were encountered: