FIX ts errors

This commit is contained in:
Norbert de Langen 2020-03-02 14:09:16 +01:00
parent c1e3cd730b
commit faf99cc5fe
No known key found for this signature in database
GPG Key ID: 976651DA156C2825
5 changed files with 1230 additions and 1168 deletions

View File

@ -26,7 +26,7 @@ const Icon = styled(Icons)({
marginRight: 4,
});
const RotatingIcon = styled(Icon)(({ theme }) => ({
const RotatingIcon = styled(Icon)<{}>(({ theme }) => ({
animation: `${theme.animation.rotate360} 1s linear infinite;`,
}));

View File

@ -24,6 +24,7 @@ interface ParsingResult<T> {
}
const ACORN_WALK_VISITORS = {
// @ts-ignore
...acornWalk.base,
JSXElement: () => {},
};
@ -43,6 +44,7 @@ function calculateNodeDepth(node: estree.Expression): number {
const depths: number[] = [];
acornWalk.ancestor(
// @ts-ignore
node,
{
ObjectExpression(_: any, ancestors: estree.Node[]) {
@ -82,6 +84,7 @@ function parseFunction(
// If there is at least a JSXElement in the body of the function, then it's a React component.
acornWalk.simple(
// @ts-ignore
funcNode.body,
{
JSXElement(node: any) {
@ -117,6 +120,7 @@ function parseClass(
// If there is at least a JSXElement in the body of the class, then it's a React component.
acornWalk.simple(
// @ts-ignore
classNode.body,
{
JSXElement(node: any) {

View File

@ -58,7 +58,9 @@ export const StoryPanel: React.FC<StoryPanelProps> = ({ api }) => {
if (story) {
const {
parameters: {
// @ts-ignore
mdxSource = '',
// @ts-ignore
storySource: { source, locationsMap } = { source: '', locationsMap: {} },
} = {},
} = story;

View File

@ -57,7 +57,7 @@
"webpack": "^4.33.0"
},
"devDependencies": {
"@storybook/client-api": "6.0.0-alpha.15",
"@storybook/client-api": "6.0.0-alpha.20",
"@types/mini-css-extract-plugin": "^0.9.0",
"@types/node": "^13.5.3",
"@types/webpack": "^4.41.0"

2388
yarn.lock

File diff suppressed because it is too large Load Diff