Fix types

This commit is contained in:
Michael Shilman 2024-01-10 12:13:24 +08:00
parent 918f28e4f5
commit 0a8c802b83
4 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
import type { PreparedStory } from '@storybook/types';
import { global } from '@storybook/global';
const excludeTags = Object.entries(global.TAGS_OPTIONS).reduce((acc, entry) => {
const excludeTags = Object.entries(global.TAGS_OPTIONS ?? {}).reduce((acc, entry) => {
const [tag, option] = entry;
if ((option as any).excludeFromDocsStories) {
acc[tag] = true;

View File

@ -12,4 +12,4 @@ declare var FEATURES: import('@storybook/types').StorybookConfigRaw['features'];
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
declare var TAGS_OPTIONS: any;
declare var TAGS_OPTIONS: import('@storybook/types').TagsOptions;

View File

@ -3,7 +3,7 @@ import { global } from '@storybook/global';
const STATIC_FILTER = 'static-filter';
const excludeTags = Object.entries(global.TAGS_OPTIONS).reduce((acc, entry) => {
const excludeTags = Object.entries(global.TAGS_OPTIONS ?? {}).reduce((acc, entry) => {
const [tag, option] = entry;
if ((option as any).excludeFromSidebar) {
acc[tag] = true;

View File

@ -7,4 +7,4 @@ declare module '@discoveryjs/json-ext';
declare module 'watchpack';
declare var FEATURES: import('@storybook/types').StorybookConfigRaw['features'];
declare var TAGS_OPTIONS: any;
declare var TAGS_OPTIONS: import('@storybook/types').TagsOptions;