Skip to content

Commit

Permalink
fix(docs): fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
mfal committed Feb 1, 2024
1 parent 09aa95d commit 458a6e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/docs/src/lib/liveCode/getDynamicComponent.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { liveCodeEditorGlobalImports } from "@/lib/liveCode/dynamicImports";
import { ComponentType } from "react";

export const getDynamicComponent = (name: string): ComponentType => {
export const getDynamicComponent = (name: string): ComponentType<never> => {
if (!(name in liveCodeEditorGlobalImports)) {
throw new Error(
`Could not find ${name} in generatedImports. Run 'yarn build:imports'.`,
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/lib/liveCode/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { ComponentType } from "react";

export interface ImportMapping extends Record<string, ComponentType> {}
export interface ImportMapping extends Record<string, ComponentType<never>> {}

1 comment on commit 458a6e1

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report for ./packages/components/

St.
Category Percentage Covered / Total
🟢 Statements 98.04% 100/102
🟢 Branches 93.75% 30/32
🟢 Functions 100% 27/27
🟢 Lines 98.04% 100/102

Test suite run success

51 tests passing in 9 suites.

Report generated by 🧪jest coverage report action from 458a6e1

Please sign in to comment.