Skip to content

Commit

Permalink
fix: add type annotations to resolve TS2742 errors in MenubarMenu com…
Browse files Browse the repository at this point in the history
…ponent

- Added type annotations to  components in  files to resolve TypeScript errors related to inferred types that cannot be named without a reference to external modules.
- Addressed issue with non-portable type inference in  dependency.
  • Loading branch information
codewithnuh committed Jan 17, 2025
1 parent e75e579 commit fc89a37
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 10 deletions.
2 changes: 1 addition & 1 deletion apps/www/registry/default/ui/menubar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Check, ChevronRight, Circle } from "lucide-react"

import { cn } from "@/lib/utils"

const MenubarMenu = MenubarPrimitive.Menu
const MenubarMenu: typeof MenubarPrimitive.Menu = MenubarPrimitive.Menu

const MenubarGroup = MenubarPrimitive.Group

Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/new-york/ui/menubar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Check, ChevronRight, Circle } from "lucide-react"

import { cn } from "@/lib/utils"

const MenubarMenu = MenubarPrimitive.Menu
const MenubarMenu: typeof MenubarPrimitive.Menu = MenubarPrimitive.Menu

const MenubarGroup = MenubarPrimitive.Group

Expand Down
18 changes: 18 additions & 0 deletions packages/cli/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import tsconfigPaths from "vite-tsconfig-paths"
import { configDefaults, defineConfig } from "vitest/config"

export default defineConfig({
test: {
exclude: [
...configDefaults.exclude,
"**/node_modules/**",
"**/fixtures/**",
"**/templates/**",
],
},
plugins: [
tsconfigPaths({
ignoreConfigErrors: true,
}),
],
})
18 changes: 18 additions & 0 deletions packages/shadcn/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import tsconfigPaths from "vite-tsconfig-paths"
import { configDefaults, defineConfig } from "vitest/config"

export default defineConfig({
test: {
exclude: [
...configDefaults.exclude,
"**/node_modules/**",
"**/fixtures/**",
"**/templates/**",
],
},
plugins: [
tsconfigPaths({
ignoreConfigErrors: true,
}),
],
})
16 changes: 8 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fc89a37

Please sign in to comment.