diff --git a/notNeededPackages.json b/notNeededPackages.json index 08f12e0071..3286978309 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -2136,6 +2136,12 @@ "sourceRepoURL": "https://servicestack.net/", "asOfVersion": "0.1.5" }, + { + "libraryName": "@storybook/addon-notes", + "typingsPackageName": "storybook__addon-notes", + "sourceRepoURL": "https://github.com/storybooks/storybook", + "asOfVersion": "5.0.0" + }, { "libraryName": "striptags", "typingsPackageName": "striptags", diff --git a/types/storybook__addon-notes/index.d.ts b/types/storybook__addon-notes/index.d.ts deleted file mode 100644 index d858e11e9e..0000000000 --- a/types/storybook__addon-notes/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Type definitions for @storybook/addon-notes 4.0 -// Project: https://github.com/storybooks/storybook, https://github.com/storybooks/storybook/tree/master/addons/notes -// Definitions by: Joscha Feth -// A.MacLeay -// Michael Loughry -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 - -import * as React from 'react'; -import { RenderFunction, StoryDecorator } from '@storybook/react'; -import { MarkedOptions } from 'marked'; - -export type WithNotesOptions = string | { - text: string; -} | { - markdown: string; - markdownOptions?: MarkedOptions; -}; - -// It would be preferable to infer the argument types, but that requires TS v 3.1 -// export function withNotes(...args: StoryDecorator extends (...a: infer A) => any ? A : never): ReturnType; -export function withNotes(story: RenderFunction, context: { kind: string, story: string }): ReturnType; -// Less-preferred but still supported: -export function withNotes(options?: WithNotesOptions): StoryDecorator; -export function withMarkdownNotes(markdown: string, options?: MarkedOptions): StoryDecorator; diff --git a/types/storybook__addon-notes/storybook__addon-notes-tests.tsx b/types/storybook__addon-notes/storybook__addon-notes-tests.tsx deleted file mode 100644 index edfe0daf14..0000000000 --- a/types/storybook__addon-notes/storybook__addon-notes-tests.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import * as React from 'react'; - -import { addDecorator, storiesOf } from '@storybook/react'; -import { withNotes, withMarkdownNotes, } from '@storybook/addon-notes'; - -// New, preferred global registration: -addDecorator(withNotes); - -const SIMPLE_MARKDOWN = ` -## Markdown for component - -A very simple component with markdown notes -`; - -storiesOf('Component', module) - .addDecorator(withNotes()) - .add('with withNotes', - () => (
my component
) - ); - -storiesOf('Component', module) - .addDecorator(withNotes('Some text')) - .add('with withNotes', - () => (
my component
) - ); - -storiesOf('Component', module) - .addDecorator(withNotes({ text: 'Some text' })) - .add('with withNotes', - () => (
my component
) - ); - -storiesOf('Component', module) - .addDecorator(withNotes({ markdown: 'Some text' })) - .add('with withNotes', - () => (
my component
) - ); - -storiesOf('Component', module) - .addDecorator(withNotes({ markdown: 'Some text', markdownOptions: { sanitize: true } })) - .add('with withNotes', - () => (
my component
) - ); diff --git a/types/storybook__addon-notes/tsconfig.json b/types/storybook__addon-notes/tsconfig.json deleted file mode 100644 index 2bc7d76ea8..0000000000 --- a/types/storybook__addon-notes/tsconfig.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "dom", - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "jsx": "react", - "typeRoots": [ - "../" - ], - "paths": { - "@storybook/addon-notes": [ - "storybook__addon-notes" - ], - "@storybook/react": [ - "storybook__react" - ] - }, - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "storybook__addon-notes-tests.tsx" - ] -} \ No newline at end of file diff --git a/types/storybook__addon-notes/tslint.json b/types/storybook__addon-notes/tslint.json deleted file mode 100644 index 3db14f85ea..0000000000 --- a/types/storybook__addon-notes/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "dtslint/dt.json" }