Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript: Migrate @storybook/docs-tools to strict TS #22567

Merged
merged 26 commits into from
Nov 29, 2023
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fa90910
feat: activate strict option in ts config
efrenaragon96 May 15, 2023
b35de57
fix: jsdocParser errors
efrenaragon96 May 15, 2023
7b1be45
fix: ts error in argTypes converter
efrenaragon96 May 15, 2023
39404a0
fix: ts error on src/argTypes/docgen folder
efrenaragon96 May 16, 2023
d95b4c3
fix: ts error on src/argTypes/docgen/flow folder
efrenaragon96 May 16, 2023
6498a92
fix: ts error on src/argTypes/docgen/typeScript folder
efrenaragon96 May 16, 2023
e49d5fd
fix: ts error in utils files
efrenaragon96 May 16, 2023
3f791b5
fix: call parseJsDoc without second param
efrenaragon96 Jun 1, 2023
0dff3fe
Prefer `satisfies` over `as`
kasperpeulen May 31, 2023
e12279a
fix: change satisfies by static type
efrenaragon96 Jun 5, 2023
305d5da
fix: use only the fields for the JsDocTags type
efrenaragon96 Jun 5, 2023
61ce834
Merge branch 'next' into ts-migrate/lib-docs-tools
ndelangen Jun 7, 2023
8382350
Merge branch 'next' into ts-migrate/lib-docs-tools
kasperpeulen Jun 9, 2023
3b54eac
Merge branch 'next' into ts-migrate/lib-docs-tools
efrenaragon96 Jun 27, 2023
96afbdc
Merge branch 'next' into ts-migrate/lib-docs-tools
JReinhold Jul 3, 2023
d78e200
fix: doc tools types
efrenaragon96 Jul 3, 2023
f0d68a3
Merge branch 'next' into ts-migrate/lib-docs-tools
efrenaragon96 Aug 2, 2023
2356aad
Merge branch 'next' into ts-migrate/lib-docs-tools
kasperpeulen Aug 4, 2023
325b0d7
Merge branch 'next' into ts-migrate/lib-docs-tools
yannbf Sep 19, 2023
f40ec49
Merge branch 'next' into ts-migrate/lib-docs-tools
ndelangen Sep 19, 2023
9ade666
fix: check possible undefined or null values
efrenaragon96 Oct 9, 2023
cf83e3f
fix: use tiny-invariant in vue docs
efrenaragon96 Oct 9, 2023
fc0b847
Merge branch 'next' into ts-migrate/lib-docs-tools
ndelangen Oct 11, 2023
804cb50
Merge branch 'next' into pr/efrenaragon96/22567
ndelangen Nov 28, 2023
f8b3d2b
regen lockfile
ndelangen Nov 28, 2023
5a74d6e
fix
ndelangen Nov 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Prefer satisfies over as
kasperpeulen committed Jun 2, 2023
commit 0dff3fe91a050490ab3f97dd83b5120b2e0a42de
6 changes: 3 additions & 3 deletions code/lib/docs-tools/src/argTypes/docgen/PropDef.ts
Original file line number Diff line number Diff line change
@@ -2,16 +2,16 @@

export interface JsDocParam {
name: string | undefined | null;
description?: string;
description?: string | null;
}

export interface JsDocReturns {
description?: string;
description?: string | null;
}

export interface JsDocTags {
params?: JsDocParam[];
returns?: JsDocReturns;
returns?: JsDocReturns | null;
}

export interface PropSummaryValue {
4 changes: 2 additions & 2 deletions code/lib/docs-tools/src/argTypes/docgen/createPropDef.ts
Original file line number Diff line number Diff line change
@@ -96,11 +96,11 @@ function applyJsDocResult(propDef: PropDef, jsDocParsingResult?: JsDocParsingRes
name: x.getPrettyName(),
description: x.description,
})),
};
} satisfies JsDocTags;

if (Object.values(value).filter(Boolean).length > 0) {
// eslint-disable-next-line no-param-reassign
propDef.jsDocTags = value as JsDocTags;
propDef.jsDocTags = value;
}
}