Avoid using "as any" in preview.ts
This commit is contained in:
Родитель
1b0f0f4566
Коммит
3d415d2852
|
@ -5,7 +5,15 @@ import { action } from "@storybook/addon-actions";
|
|||
// Allow all stories/components to use Codicons
|
||||
import "@vscode/codicons/dist/codicon.css";
|
||||
|
||||
(window as any).acquireVsCodeApi = () => ({
|
||||
import type { VsCodeApi } from "../src/view/vscode-api";
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
acquireVsCodeApi: () => VsCodeApi;
|
||||
}
|
||||
}
|
||||
|
||||
window.acquireVsCodeApi = () => ({
|
||||
postMessage: action("post-vscode-message"),
|
||||
setState: action("set-vscode-state"),
|
||||
});
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
VariantAnalysisState,
|
||||
} from "../common/interface-types";
|
||||
|
||||
interface VsCodeApi {
|
||||
export interface VsCodeApi {
|
||||
/**
|
||||
* Post message back to vscode extension.
|
||||
*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче