mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
Fix types
This commit is contained in:
parent
918f28e4f5
commit
0a8c802b83
@ -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;
|
||||
|
2
code/addons/docs/src/typings.d.ts
vendored
2
code/addons/docs/src/typings.d.ts
vendored
@ -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;
|
||||
|
@ -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;
|
||||
|
2
code/lib/core-server/src/typings.d.ts
vendored
2
code/lib/core-server/src/typings.d.ts
vendored
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user