csf icon indicating copy to clipboard operation
csf copied to clipboard

Parameters is loosely typed in CSF configuration

Open arbrsts opened this issue 1 year ago • 0 comments

https://github.com/ComponentDriven/csf/blob/next/src/story.ts

export interface Parameters {
  [name: string]: any;
}

Hi, I was trying to add an parameters.docs.story.iFrameHeight option but noticed that parameters is loosely typed.

Something like below would be helpful to document all available options.

export interface Parameters {
  docs?: {
    story?: {
      iFrameHeight?: number;
      // other story params...
    };
    // other docs params...
  };
  // other top-level params...
}

arbrsts avatar Nov 26 '24 09:11 arbrsts