From 16403c957aa6d2dfa9a2bb29cbe4b002aa9cadeb Mon Sep 17 00:00:00 2001 From: AlbertGao Date: Sat, 19 Jan 2019 11:39:33 +1300 Subject: [PATCH] added displayName property Source code is here: https://github.com/storybooks/addon-jsx/blob/5e13544668fe84ae659139bfc25eecd79cb07998/src/index.js#L42 Repo Readme.md is here: https://github.com/storybooks/addon-jsx --- types/storybook-addon-jsx/index.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/types/storybook-addon-jsx/index.d.ts b/types/storybook-addon-jsx/index.d.ts index 0bd019abeb..217a663fee 100644 --- a/types/storybook-addon-jsx/index.d.ts +++ b/types/storybook-addon-jsx/index.d.ts @@ -5,13 +5,16 @@ // TypeScript Version: 2.8 import '@storybook/react'; -import { ReactNode } from 'react'; +import { ReactNode, ReactElement } from 'react'; + +type displayNameFunc = (element: ReactElement) => string; declare module '@storybook/react' { interface Options { skip?: number; enableBeautify?: boolean; onBeforeRender?: (domString: string) => string; + displayName?: string | displayNameFunc; } interface Story {