[@storybook/addon-notes] remove typings provided by package directly (#34111)

This commit is contained in:
Gaëtan Maisse
2019-03-29 11:32:02 -07:00
committed by Ron Buckton
parent aa5f059ee2
commit 53b73abbb3
5 changed files with 6 additions and 102 deletions
+6
View File
@@ -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",
-25
View File
@@ -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 <https://github.com/joscha>
// A.MacLeay <https://github.com/amacleay>
// Michael Loughry <https://github.com/MLoughry>
// 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<StoryDecorator>;
export function withNotes(story: RenderFunction, context: { kind: string, story: string }): ReturnType<StoryDecorator>;
// Less-preferred but still supported:
export function withNotes(options?: WithNotesOptions): StoryDecorator;
export function withMarkdownNotes(markdown: string, options?: MarkedOptions): StoryDecorator;
@@ -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',
() => (<div>my component</div>)
);
storiesOf('Component', module)
.addDecorator(withNotes('Some text'))
.add('with withNotes',
() => (<div>my component</div>)
);
storiesOf('Component', module)
.addDecorator(withNotes({ text: 'Some text' }))
.add('with withNotes',
() => (<div>my component</div>)
);
storiesOf('Component', module)
.addDecorator(withNotes({ markdown: 'Some text' }))
.add('with withNotes',
() => (<div>my component</div>)
);
storiesOf('Component', module)
.addDecorator(withNotes({ markdown: 'Some text', markdownOptions: { sanitize: true } }))
.add('with withNotes',
() => (<div>my component</div>)
);
@@ -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"
]
}
-1
View File
@@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }