Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: 'k' is defined but never used. #4225

Open
2 tasks done
Kazooki123 opened this issue Jul 9, 2024 · 3 comments
Open
2 tasks done

[bug]: 'k' is defined but never used. #4225

Kazooki123 opened this issue Jul 9, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Kazooki123
Copy link

Describe the bug

In chart.tsx or in components/ui/charts.tsx in line 11:

export type ChartConfig = {
  [k in string]: {
  ^^
    label?: React.ReactNode
    icon?: React.ComponentType
  } & (
    | { color?: string; theme?: never }
    | { color?: never; theme: Record<keyof typeof THEMES, string> }
  )
}

An error occured saying "'k' is defined but never used.".

Any ways or solutions to fix this?

Affected component/components

chart.tsx

How to reproduce

  1. Go to components/ui/chart.tsx
  2. Check line 11

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

OS Name:                   Microsoft Windows 11 Home Single Language
OS Version:                10.0.22621 N/A Build 22621
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
Registered Owner:          asus
Registered Organization:   N/A
Product ID:                XXXXXXXXXXXXXXXXXXXX
Original Install Date:     21/07/2023, 1:48:39 pm
System Boot Time:          09/07/2024, 10:03:39 am
System Manufacturer:       ASUSTeK COMPUTER INC.
System Model:              VivoBook_ASUSLaptop X515DAP_M515DA
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@Kazooki123 Kazooki123 added the bug Something isn't working label Jul 9, 2024
@shadcn
Copy link
Collaborator

shadcn commented Jul 9, 2024

what's in your tsconfig.json?

@Kazooki123
Copy link
Author

{
  "compilerOptions": {
    "target": "es6",
    "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noEmit": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "jsx": "preserve",
    "incremental": true,
    "plugins": [
      {
        "name": "next"
      }
    ],
    "paths": {
      "@/*": ["./*"]
    }
  },
  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
  "exclude": ["node_modules"]
}

@Kazooki123
Copy link
Author

Let me know if it's finally fixed or there is a solution. Thank you in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants