mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 08:01:20 +08:00
Improve typings for Source enhancement
This commit is contained in:
parent
1c6262a4a0
commit
374aa99d32
@ -1,4 +1,5 @@
|
||||
import { ArgsEnhancer, combineParameters } from '@storybook/client-api';
|
||||
import { combineParameters } from '@storybook/client-api';
|
||||
import { StoryContext, Parameters } from '@storybook/addons';
|
||||
|
||||
interface Location {
|
||||
line: number;
|
||||
@ -36,7 +37,7 @@ const extract = (targetId: string, { source, locationsMap }: StorySource) => {
|
||||
].join('\n');
|
||||
};
|
||||
|
||||
export const enhanceSource: ArgsEnhancer = (context) => {
|
||||
export const enhanceSource = (context: StoryContext): Parameters => {
|
||||
const { id, parameters } = context;
|
||||
const { storySource, docs = {} } = parameters;
|
||||
const { formatSource } = docs;
|
||||
|
Loading…
x
Reference in New Issue
Block a user