Skip to content

[next.js]fix: correct useRef type and container type casting #412

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bunniestech
Copy link

Add example checklist

  • Any commit does not contain the charting library's code
  • The example is self-sufficient and contains only necessary files/changes

Bug fix checklist

  • Any commit does not contain the charting library's code
  • Addresses an existing issue: #00000

Description

when run npm run build,the terminal shows:

    Linting and checking validity of types  ...Failed to compile.
    
    ./components/TVChartContainer/index.tsx:7:3
    Type error: Expected 1 arguments, but got 0.
    
       5 | export const TVChartContainer = (props: Partial<ChartingLibraryWidgetOptions>) => {
       6 |  const chartContainerRef =
    >  7 |          useRef<HTMLDivElement>() as React.MutableRefObject<HTMLInputElement>;
         |          ^
       8 |
       9 |  useEffect(() => {
      10 |          const widgetOptions: ChartingLibraryWidgetOptions = {
    Static worker exited with code: 1 and signal: null

New Behavior

npm run build works well,no typescript problem anymore

@bunniestech bunniestech changed the title fix: correct useRef type and container type casting [next.js]fix: correct useRef type and container type casting Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant