Skip to content

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