diff --git a/code/lib/docs-tools/src/argTypes/docgen/PropDef.ts b/code/lib/docs-tools/src/argTypes/docgen/PropDef.ts index e15cb5c46a65..df4fc639c521 100644 --- a/code/lib/docs-tools/src/argTypes/docgen/PropDef.ts +++ b/code/lib/docs-tools/src/argTypes/docgen/PropDef.ts @@ -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 { diff --git a/code/lib/docs-tools/src/argTypes/docgen/createPropDef.ts b/code/lib/docs-tools/src/argTypes/docgen/createPropDef.ts index 2a86fbc95ddf..ab261afb6116 100644 --- a/code/lib/docs-tools/src/argTypes/docgen/createPropDef.ts +++ b/code/lib/docs-tools/src/argTypes/docgen/createPropDef.ts @@ -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; } }