Skip to content

Commit e50a2df

Browse files
committed
fix(core): correct return type of helpers.getKeyword
1 parent 7951585 commit e50a2df

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/typedoc-plugin-markdown/src/theme/context/helpers/get-keyword.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ReflectionKind } from 'typedoc';
22

3-
export function getKeyword(model: ReflectionKind): string {
3+
export function getKeyword(model: ReflectionKind): string | undefined {
44
const KEYWORD_MAP = {
55
[ReflectionKind.Class]: 'class',
66
[ReflectionKind.Enum]: 'enum',

packages/typedoc-plugin-markdown/src/theme/context/resources.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ export const resourceHelpers = (context: MarkdownThemeContext) => {
320320
options?: { isTarget: boolean } | undefined,
321321
) => helpers.getHierarchyType.apply(context, [model, options]) as string,
322322
getKeyword: (model: ReflectionKind) =>
323-
helpers.getKeyword.apply(context, [model]) as string,
323+
helpers.getKeyword.apply(context, [model]) as string | undefined,
324324
getModifier: (model: DeclarationReflection) =>
325325
helpers.getModifier.apply(context, [model]) as string | null,
326326
getParameterDefaultValue: (model: ParameterReflection) =>

0 commit comments

Comments
 (0)