Skip to content

Commit

Permalink
Merge pull request #20605 from storybookjs/norbert/make-typescript-ch…
Browse files Browse the repository at this point in the history
…eck-work-valid-next

make changes to typings files to ensure this the check command succeeds
  • Loading branch information
ndelangen authored Jan 13, 2023
2 parents 710d668 + 128c2a7 commit 0199ca3
Show file tree
Hide file tree
Showing 23 changed files with 110 additions and 22 deletions.
1 change: 1 addition & 0 deletions code/addons/backgrounds/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
2 changes: 2 additions & 0 deletions code/addons/docs/src/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ declare module 'vue/dist/vue';
declare module 'sveltedoc-parser' {
export function parse(options: any): Promise<any>;
}

declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
10 changes: 9 additions & 1 deletion code/addons/storyshots-core/src/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ declare module '@storybook/babel-plugin-require-context-hook/register';

declare var STORYBOOK_ENV: any;
declare var STORIES: any;
declare var FEATURES: any;

declare var FEATURES:
| {
storyStoreV7?: boolean;
breakingChangesV7?: boolean;
argTypeTargetsV7?: boolean;
}
| undefined;

declare var __STORYBOOK_STORY_STORE__: any;
declare var __requireContext: any;
1 change: 1 addition & 0 deletions code/addons/toolbars/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
13 changes: 11 additions & 2 deletions code/frameworks/angular/src/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,18 @@ declare var __STORYBOOK_PREVIEW__: any;
declare var __STORYBOOK_STORY_STORE__: any;
declare var CHANNEL_OPTIONS: any;
declare var DOCS_OPTIONS: any;
declare var FEATURES: any;

declare var FEATURES:
| {
storyStoreV7?: boolean;
interactionsDebugger?: boolean;
breakingChangesV7?: boolean;
argTypeTargetsV7?: boolean;
}
| undefined;

declare var IS_STORYBOOK: any;
declare var LOGLEVEL: any;
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
declare var STORIES: any;
declare var STORYBOOK_ENV: 'angular';
declare var STORYBOOK_HOOKS_CONTEXT: any;
1 change: 1 addition & 0 deletions code/lib/cli/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
declare module 'envinfo';
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
1 change: 1 addition & 0 deletions code/lib/client-api/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
1 change: 1 addition & 0 deletions code/lib/core-client/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
9 changes: 8 additions & 1 deletion code/lib/core-server/src/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@ declare module '@storybook/manager';
declare module '@discoveryjs/json-ext';
declare module 'watchpack';

declare var FEATURES: any;
declare var FEATURES:
| {
storyStoreV7?: boolean;
interactionsDebugger?: boolean;
breakingChangesV7?: boolean;
argTypeTargetsV7?: boolean;
}
| undefined;
12 changes: 11 additions & 1 deletion code/lib/instrumenter/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/* eslint-disable no-underscore-dangle, @typescript-eslint/naming-convention */
declare var FEATURES: any;

declare var FEATURES:
| {
storyStoreV7?: boolean;
interactionsDebugger?: boolean;
breakingChangesV7?: boolean;
argTypeTargetsV7?: boolean;
}
| undefined;

declare var __STORYBOOK_PREVIEW__: any;
declare var __STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__: any;
declare var __STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__: any;
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
1 change: 1 addition & 0 deletions code/lib/manager-api-shim/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
12 changes: 11 additions & 1 deletion code/lib/manager-api/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
/* eslint-disable no-underscore-dangle, @typescript-eslint/naming-convention */
declare var RELEASE_NOTES_DATA: any;
declare var __STORYBOOK_ADDONS_MANAGER: any;
declare var FEATURES: { storyStoreV7?: boolean } | undefined;

declare var FEATURES:
| {
storyStoreV7?: boolean;
interactionsDebugger?: boolean;
breakingChangesV7?: boolean;
argTypeTargetsV7?: boolean;
}
| undefined;

declare var REFS: any;
declare var VERSIONCHECK: any;
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
33 changes: 18 additions & 15 deletions code/lib/preview-api/src/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,30 @@ declare module 'better-opn';
declare module 'open';
declare module '@aw-web-design/x-default-browser';

type Features = {
storyStoreV7?: boolean;
breakingChangesV7?: boolean;
argTypeTargetsV7?: boolean;
};
declare var FEATURES:
| {
storyStoreV7?: boolean;
interactionsDebugger?: boolean;
breakingChangesV7?: boolean;
argTypeTargetsV7?: boolean;
}
| undefined;

var FEATURES: Features | undefined;
var STORIES: any;
var DOCS_OPTIONS: any;
declare var STORIES: any;
declare var DOCS_OPTIONS: any;

// To enable user code to detect if it is running in Storybook
var IS_STORYBOOK: boolean;
declare var IS_STORYBOOK: boolean;

// ClientApi (and StoreStore) are really singletons. However they are not created until the
// relevant framework instantiates them via `start.js`. The good news is this happens right away.
var __STORYBOOK_ADDONS_CHANNEL__: any;
var __STORYBOOK_ADDONS_PREVIEW: any;
var __STORYBOOK_CLIENT_API__: import('./modules/client-api/ClientApi').ClientApi<any>;
var __STORYBOOK_PREVIEW__: import('./modules/preview-web/PreviewWeb').PreviewWeb<any>;
var __STORYBOOK_STORY_STORE__: any;
var STORYBOOK_HOOKS_CONTEXT: any;
declare var __STORYBOOK_ADDONS_CHANNEL__: any;
declare var __STORYBOOK_ADDONS_PREVIEW: any;
declare var __STORYBOOK_CLIENT_API__: import('./modules/client-api/ClientApi').ClientApi<any>;
declare var __STORYBOOK_PREVIEW__: import('./modules/preview-web/PreviewWeb').PreviewWeb<any>;
declare var __STORYBOOK_STORY_STORE__: any;
declare var STORYBOOK_HOOKS_CONTEXT: any;
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;

declare module 'ansi-to-html';
declare class AnsiToHtml {
Expand Down
1 change: 1 addition & 0 deletions code/lib/preview-web/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
1 change: 1 addition & 0 deletions code/lib/preview/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
1 change: 1 addition & 0 deletions code/lib/store/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
1 change: 1 addition & 0 deletions code/renderers/react/src/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ declare module 'react-dom/client' {

declare var STORYBOOK_ENV: 'react';
declare var FRAMEWORK_OPTIONS: any;
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
1 change: 1 addition & 0 deletions code/renderers/svelte/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
declare var STORYBOOK_ENV: 'svelte';
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
1 change: 1 addition & 0 deletions code/renderers/vue/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
declare var STORYBOOK_ENV: 'vue';
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
1 change: 1 addition & 0 deletions code/renderers/web-components/src/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
declare var STORYBOOK_ENV: 'web-components';
declare var __STORYBOOK_CUSTOM_ELEMENTS_MANIFEST__: any;
declare var __STORYBOOK_CUSTOM_ELEMENTS__: any;
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
1 change: 1 addition & 0 deletions code/ui/blocks/src/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ declare module '*.md';

declare var __DOCS_CONTEXT__: any;
declare var PREVIEW_URL: any;
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;
10 changes: 9 additions & 1 deletion code/ui/manager/src/settings/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
/* eslint-disable @typescript-eslint/naming-convention */
declare module '@storybook/components/src/treeview/utils';

declare var FEATURES: any;
declare var FEATURES:
| {
storyStoreV7?: boolean;
interactionsDebugger?: boolean;
breakingChangesV7?: boolean;
argTypeTargetsV7?: boolean;
}
| undefined;

declare var SERVER_CHANNEL_URL: any;

declare var __REACT__: any;
Expand Down
17 changes: 17 additions & 0 deletions code/ui/manager/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
/* eslint-disable no-underscore-dangle, @typescript-eslint/naming-convention */
declare module 'chromatic/isChromatic';

declare var DOCS_OPTIONS: any;
declare var CONFIG_TYPE: any;
declare var PREVIEW_URL: any;

declare var __STORYBOOK_ADDONS_MANAGER: any;
declare var RELEASE_NOTES_DATA: any;

declare var FEATURES:
| {
storyStoreV7?: boolean;
interactionsDebugger?: boolean;
breakingChangesV7?: boolean;
argTypeTargetsV7?: boolean;
}
| undefined;

declare var REFS: any;
declare var VERSIONCHECK: any;
declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;

0 comments on commit 0199ca3

Please sign in to comment.