#36452·storybook

[Bug]: Typescript error when skipLibChecks: false

Author: Jme797Created Sep 25, 2026Updated Sep 28, 2026
Labelsbugneeds triage

Describe the bug

Looks like an ignore/disable comment is not quite in the correct place of the compiled version of [email protected]

Image

Amongst other errors

node_modules/@storybook/react/dist/chunk-ojHmM-yX.d.ts:1026:86 - error TS2578: Unused '@ts-expect-error' directive.

1026 interface ReactMeta<T extends ReactTypes, MetaInput extends ComponentAnnotations<T>> /** @ts-expect-error ReactMeta requires two type parameters, but Meta's constraints differ */ extends Meta<T, MetaInput> {
                                                                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@storybook/react/dist/chunk-ojHmM-yX.d.ts:1026:196 - error TS2344: Type 'MetaInput' does not satisfy the constraint 'ComponentAnnotations$1<T, T["args"]>'.
  Type 'ComponentAnnotations$1<T, Args$2>' is not assignable to type 'ComponentAnnotations$1<T, T["args"]>'.
    Types of property 'play' are incompatible.
      Type 'PlayFunction<T, Args$2> | undefined' is not assignable to type 'PlayFunction<T, T["args"]> | undefined'.
        Type 'PlayFunction<T, Args$2>' is not assignable to type 'PlayFunction<T, T["args"]>'.
          Types of parameters 'context' and 'context' are incompatible.
            Type 'PlayFunctionContext<T, T["args"]>' is not assignable to type 'PlayFunctionContext<T, Args$2>'.
              Types of property 'initialArgs' are incompatible.
                Type 'T["args"]' is not assignable to type 'Args$2'.

1026 interface ReactMeta<T extends ReactTypes, MetaInput extends ComponentAnnotations<T>> /** @ts-expect-error ReactMeta requires two type parameters, but Meta's constraints differ */ extends Meta<T, MetaInput> {
                                                                                                                                                                                                        ~~~~~~~~~

node_modules/@storybook/react/dist/chunk-ojHmM-yX.d.ts:1072:176 - error TS2578: Unused '@ts-expect-error' directive.

1072   story<TInput extends Simplify<StoryAnnotations<T, AddMocks<T['args'], MetaInput['args']>, SetOptional<T['args'], keyof T['args'] & keyof MetaInput['args']>>>>(story: TInput /** @ts-expect-error hard */): ReactStory<T, TInput>;
                                                                                                                                                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@storybook/react/dist/chunk-ojHmM-yX.d.ts:1072:221 - error TS2344: Type 'TInput' does not satisfy the constraint 'StoryAnnotations$1<T, T["args"]>'.
  Type '{ [KeyType in keyof StoryAnnotations$1<T, { [KeyType in keyof { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any) => any ? MetaInput["args"][T] : T["args"][T] : T["args"][T]; }]: { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] e...' is not assignable to type 'StoryAnnotations$1<T, T["args"]>'.
    Type '{ [KeyType in keyof StoryAnnotations$1<T, { [KeyType in keyof { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any) => any ? MetaInput["args"][T] : T["args"][T] : T["args"][T]; }]: { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] e...' is not assignable to type 'BaseAnnotations<T, T["args"]>'.
      Types of property 'decorators' are incompatible.
        Type 'StoryAnnotations$1<T, { [KeyType in keyof { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any) => any ? MetaInput["args"][T] : T["args"][T] : T["args"][T]; }]: { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any...' is not assignable to type 'DecoratorFunction$2<T, { [KeyType in keyof T["args"]]: T["args"][KeyType]; }> | DecoratorFunction$2<T, { [KeyType in keyof T["args"]]: T["args"][KeyType]; }>[] | undefined'.
          Type '(DecoratorFunction$2<T, { [KeyType in keyof { [KeyType in keyof { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any) => any ? MetaInput["args"][T] : T["args"][T] : T["args"][T]; }]: { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T]...' is not assignable to type 'DecoratorFunction$2<T, { [KeyType in keyof T["args"]]: T["args"][KeyType]; }> | DecoratorFunction$2<T, { [KeyType in keyof T["args"]]: T["args"][KeyType]; }>[] | undefined'.
            Type 'DecoratorFunction$2<T, { [KeyType in keyof { [KeyType in keyof { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any) => any ? MetaInput["args"][T] : T["args"][T] : T["args"][T]; }]: { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] ...' is not assignable to type 'DecoratorFunction$2<T, { [KeyType in keyof T["args"]]: T["args"][KeyType]; }> | DecoratorFunction$2<T, { [KeyType in keyof T["args"]]: T["args"][KeyType]; }>[] | undefined'.
              Type 'DecoratorFunction$2<T, { [KeyType in keyof { [KeyType in keyof { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any) => any ? MetaInput["args"][T] : T["args"][T] : T["args"][T]; }]: { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] ...' is not assignable to type 'DecoratorFunction$2<T, { [KeyType in keyof T["args"]]: T["args"][KeyType]; }>'.
                Types of parameters 'c' and 'c' are incompatible.
                  Type 'StoryContext$2<T, { [KeyType in keyof T["args"]]: T["args"][KeyType]; }>' is not assignable to type 'StoryContext$2<T, { [KeyType in keyof { [KeyType in keyof { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any) => any ? MetaInput["args"][T] : T["args"][T] : T["args"][T]; }]: { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] exten...'.
                    Type '{ [KeyType in keyof T["args"]]: T["args"][KeyType]; }' is not assignable to type '{ [KeyType in keyof { [KeyType in keyof { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any) => any ? MetaInput["args"][T] : T["args"][T] : T["args"][T]; }]: { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any) ...'.
                      Type 'T["args"][KeyType]' is not assignable to type 'KeyType extends keyof MetaInput["args"] ? MetaInput["args"][KeyType] extends (...args: any) => any ? MetaInput["args"][KeyType] : T["args"][KeyType] : T["args"][KeyType]'.
                        Type 'T["args"][keyof T["args"]]' is not assignable to type 'KeyType extends keyof MetaInput["args"] ? MetaInput["args"][KeyType] extends (...args: any) => any ? MetaInput["args"][KeyType] : T["args"][KeyType] : T["args"][KeyType]'.      
                          Type 'T["args"][string] | T["args"][number] | T["args"][symbol]' is not assignable to type 'KeyType extends keyof MetaInput["args"] ? MetaInput["args"][KeyType] extends (...args: any) => any ? MetaInput["args"][KeyType] : T["args"][KeyType] : T["args"][KeyType]'.
                            Type 'T["args"][string]' is not assignable to type 'KeyType extends keyof MetaInput["args"] ? MetaInput["args"][KeyType] extends (...args: any) => any ? MetaInput["args"][KeyType] : T["args"][KeyType] : T["args"][KeyType]'.
                              Type 'TInput' is not assignable to type 'BaseAnnotations<T, T["args"]>'.
                                Type '{ [KeyType in keyof StoryAnnotations$1<T, { [KeyType in keyof { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any) => any ? MetaInput["args"][T] : T["args"][T] : T["args"][T]; }]: { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] e...' is not assignable to type 'BaseAnnotations<T, T["args"]>'.
                                  Types of property 'decorators' are incompatible.
                                    Type 'StoryAnnotations$1<T, { [KeyType in keyof { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any) => any ? MetaInput["args"][T] : T["args"][T] : T["args"][T]; }]: { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any...' is not assignable to type 'DecoratorFunction$2<T, { [KeyType in keyof T["args"]]: T["args"][KeyType]; }> | DecoratorFunction$2<T, { [KeyType in keyof T["args"]]: T["args"][KeyType]; }>[] | undefined'.
                                      Type '(DecoratorFunction$2<T, { [KeyType in keyof { [KeyType in keyof { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any) => any ? MetaInput["args"][T] : T["args"][T] : T["args"][T]; }]: { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T]...' is not assignable to type 'DecoratorFunction$2<T, { [KeyType in keyof T["args"]]: T["args"][KeyType]; }> | DecoratorFunction$2<T, { [KeyType in keyof T["args"]]: T["args"][KeyType]; }>[] | undefined'.
                                        Type 'DecoratorFunction$2<T, { [KeyType in keyof { [KeyType in keyof { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any) => any ? MetaInput["args"][T] : T["args"][T] : T["args"][T]; }]: { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] ...' is not assignable to type 'DecoratorFunction$2<T, { [KeyType in keyof T["args"]]: T["args"][KeyType]; }> | DecoratorFunction$2<T, { [KeyType in keyof T["args"]]: T["args"][KeyType]; }>[] | undefined'.
                                          Type 'DecoratorFunction$2<T, { [KeyType in keyof { [KeyType in keyof { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any) => any ? MetaInput["args"][T] : T["args"][T] : T["args"][T]; }]: { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] ...' is not assignable to type 'DecoratorFunction$2<T, { [KeyType in keyof T["args"]]: T["args"][KeyType]; }>'.
                                            Types of parameters 'c' and 'c' are incompatible.
                                              Type 'StoryContext$2<T, { [KeyType in keyof T["args"]]: T["args"][KeyType]; }>' is not assignable to type 'StoryContext$2<T, { [KeyType in keyof { [KeyType in keyof { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any) => any ? MetaInput["args"][T] : T["args"][T] : T["args"][T]; }]: { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] exten...'.
                                                Type '{ [KeyType in keyof T["args"]]: T["args"][KeyType]; }' is not assignable to type '{ [KeyType in keyof { [KeyType in keyof { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any) => any ? MetaInput["args"][T] : T["args"][T] : T["args"][T]; }]: { [T in keyof T["args"]]: T extends keyof MetaInput["args"] ? MetaInput["args"][T] extends (...args: any) ...'.
                                                  Type 'T["args"][KeyType]' is not assignable to type 'KeyType extends keyof MetaInput["args"] ? MetaInput["args"][KeyType] extends (...args: any) => any ? MetaInput["args"][KeyType] : T["args"][KeyType] : T["args"][KeyType]'.
                                                    Type 'T["args"][keyof T["args"]]' is not assignable to type 'KeyType extends keyof MetaInput["args"] ? MetaInput["args"][KeyType] extends (...args: any) => any ? MetaInput["args"][KeyType] : T["args"][KeyType] : T["args"][KeyType]'.
                                                      Type 'T["args"][string] | T["args"][number] | T["args"][symbol]' is not assignable to type 'KeyType extends keyof MetaInput["args"] ? MetaInput["args"][KeyType] extends (...args: any) => any ? MetaInput["args"][KeyType] : T["args"][KeyType] : T["args"][KeyType]'.
                                                        Type 'T["args"][string]' is not assignable to type 'KeyType extends keyof MetaInput["args"] ? MetaInput["args"][KeyType] extends (...args: any) => any ? MetaInput["args"][KeyType] : T["args"][KeyType] : T["args"][KeyType]'.

1072   story<TInput extends Simplify<StoryAnnotations<T, AddMocks<T['args'], MetaInput['args']>, SetOptional<T['args'], keyof T['args'] & keyof MetaInput['args']>>>>(story: TInput /** @ts-expect-error hard */): ReactStory<T, TInput>;

With typescript 5.9.3

Reproduction link

https://github.com/Jme797/storybook-bug

Reproduction steps

bash
git clone 
yarn install
yarn tsc --noEmit

System

bash
│  Storybook Environment Info:
│

│  System:
│  OS: Linux 6.18 Ubuntu 26.04.1 LTS 26.04.1 LTS (Resolute Raccoon)
│  CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
│  Shell: 5.3.9 - /bin/bash
│  Binaries:
│  Node: 24.19.0 - /tmp/xfs-80b73f92/node
│  Yarn: 4.18.1 - /tmp/xfs-80b73f92/yarn <----- active
│  npm: 12.0.2 - /home/jordan/.nvm/versions/node/v24.19.0/bin/npm
│  Browsers:
│  Chrome: 152.0.7977.64
│  Firefox: 155.0.1
│  npmPackages:
│  @storybook/react-vite: ^10.6.0 => 10.6.0
│  storybook: ^10.6.0 => 10.6.0

Additional context

No response