Expected behaviour
TypeScript compiler doesn't report any errors.
Actual behaviour
TypeScript compiler reports several errors:
node_modules/.pnpm/@highcharts+react@4.2.1_@types+react@19.2.14_highcharts@12.5.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@highcharts/react/index.d.ts:14:15 - error TS2306: File 'node_modules/.pnpm/@highcharts+react@4.2.1_@types+react@19.2.14_highcharts@12.5.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@highcharts/react/indicators/index.d.ts' is not a module.
14 export * from "./indicators/index.js";
~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/@highcharts+react@4.2.1_@types+react@19.2.14_highcharts@12.5.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@highcharts/react/options/Legend.d.ts:74:59 - error TS2304: Cannot find name 'Point'.
74 labelFormatter?: Highcharts.FormatterCallbackFunction<Point | Series>;
~~~~~
node_modules/.pnpm/@highcharts+react@4.2.1_@types+react@19.2.14_highcharts@12.5.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@highcharts/react/options/Legend.d.ts:74:67 - error TS2304: Cannot find name 'Series'.
74 labelFormatter?: Highcharts.FormatterCallbackFunction<Point | Series>;
~~~~~~
node_modules/.pnpm/@highcharts+react@4.2.1_@types+react@19.2.14_highcharts@12.5.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@highcharts/react/options/PlotOptions.d.ts:59:27 - error TS2314: Generic type 'Array<T>' requires 1 type argument(s).
59 units?: Array<Array<string, Array<number> | null>>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/@highcharts+react@4.2.1_@types+react@19.2.14_highcharts@12.5.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@highcharts/react/options/PlotOptions.d.ts:164:62 - error TS2304: Cannot find name 'Series'.
164 formatter?: Highcharts.FormatterCallbackFunction<Series>;
~~~~~~
node_modules/.pnpm/@highcharts+react@4.2.1_@types+react@19.2.14_highcharts@12.5.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@highcharts/react/options/PlotOptions.d.ts:225:39 - error TS2724: '"node_modules/.pnpm/highcharts@12.5.0/node_modules/highcharts/highcharts"' has no exported member named 'PlotSeriesOptions'. Did you mean 'SeriesOptions'?
225 navigatorOptions?: Highcharts.PlotSeriesOptions;
~~~~~~~~~~~~~~~~~
node_modules/.pnpm/@highcharts+react@4.2.1_@types+react@19.2.14_highcharts@12.5.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@highcharts/react/options/XAxis.d.ts:270:19 - error TS2314: Generic type 'Array<T>' requires 1 type argument(s).
270 units?: Array<Array<string, Array<number> | null>>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/@highcharts+react@4.2.1_@types+react@19.2.14_highcharts@12.5.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@highcharts/react/options/YAxis.d.ts:165:19 - error TS2314: Generic type 'Array<T>' requires 1 type argument(s).
165 stops?: Array<Array<number, Highcharts.ColorType>>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/@highcharts+react@4.2.1_@types+react@19.2.14_highcharts@12.5.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@highcharts/react/options/YAxis.d.ts:321:19 - error TS2314: Generic type 'Array<T>' requires 1 type argument(s).
321 units?: Array<Array<string, Array<number> | null>>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 9 errors in 5 files.
Errors Files
1 node_modules/.pnpm/@highcharts+react@4.2.1_@types+react@19.2.14_highcharts@12.5.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@highcharts/react/index.d.ts:14
2 node_modules/.pnpm/@highcharts+react@4.2.1_@types+react@19.2.14_highcharts@12.5.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@highcharts/react/options/Legend.d.ts:74
3 node_modules/.pnpm/@highcharts+react@4.2.1_@types+react@19.2.14_highcharts@12.5.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@highcharts/react/options/PlotOptions.d.ts:59
1 node_modules/.pnpm/@highcharts+react@4.2.1_@types+react@19.2.14_highcharts@12.5.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@highcharts/react/options/XAxis.d.ts:270
2 node_modules/.pnpm/@highcharts+react@4.2.1_@types+react@19.2.14_highcharts@12.5.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@highcharts/react/options/YAxis.d.ts:165
Live demo with steps to reproduce
pnpm init
pnpm add @highcharts/react react
pnpm add -D @types/react typescript
- Create
index.ts with:
# index.ts
import React from "react"
import { Chart } from "@highcharts/react"
pnpm exec tsc index.ts
Product version
@highcharts/react 4.2.1
react 19.2.4
@types/react 19.2.14
typescript 6.0.2
Affected browser(s)
n/a
Expected behaviour
TypeScript compiler doesn't report any errors.
Actual behaviour
TypeScript compiler reports several errors:
Live demo with steps to reproduce
pnpm initpnpm add @highcharts/react reactpnpm add -D @types/react typescriptindex.tswith:pnpm exec tsc index.tsProduct version
@highcharts/react4.2.1react19.2.4@types/react19.2.14typescript6.0.2Affected browser(s)
n/a