Skip to content

Commit fc22253

Browse files
committed
style(cli): make targets pass for metadata cmd
1 parent dcca125 commit fc22253

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

tools/cli/src/commands/metadata/impl/dts-parser.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,11 @@ function extractTypeAliasMembers(decl: TypeAliasDeclaration, members: Record<str
556556
members[name] = {
557557
name,
558558
type: propDecl.getType().getText(propDecl),
559-
required: !('hasQuestionToken' in propDecl && (propDecl as any).hasQuestionToken()),
559+
required: !(
560+
'hasQuestionToken' in propDecl &&
561+
typeof propDecl.hasQuestionToken === 'function' &&
562+
propDecl.hasQuestionToken()
563+
),
560564
description: jsDocDescription,
561565
...(defaultValue !== undefined ? { defaultValue } : {}),
562566
};

tools/cli/src/commands/metadata/impl/markdown-formatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export function formatMetadataAsMarkdown(data: MetadataOutput): string {
9090
// External References
9191
if (externalReferences && Object.keys(externalReferences).length > 0) {
9292
const totalSymbols = Object.values(externalReferences).reduce(
93-
(sum, pkg) => sum + Object.keys(pkg.symbols).length,
93+
(sum, extPkg) => sum + Object.keys(extPkg.symbols).length,
9494
0,
9595
);
9696

tools/cli/src/commands/metadata/impl/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export interface BaseSymbolDoc {
6767
description: string;
6868
/** Full type signature text. */
6969
typeSignature: string;
70-
/** JSDoc tags extracted from the declaration (e.g. @internal, @deprecated). */
70+
/** JSDoc tags extracted from the declaration (e.g. internal, deprecated). */
7171
tags: Record<string, string>;
7272
}
7373

0 commit comments

Comments
 (0)