-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
type check not pass #1457
Comments
Hello! versions:
|
For what it's worth, I have the same issue and tried fixing it by using Yarn's dependency resolutions. I added this to my package.json and the errors are still there 😞 "resolutions": {
"react-spring": "^9.0.0"
} Versions:
And I had to also install Also in case it's useful, here are the errors that I get: node_modules/@nivo/core/index.d.ts:2:10 - error TS2305: Module '"react-spring"' has no exported member 'OpaqueInterpolation'.
2 import { OpaqueInterpolation, SpringConfig } from 'react-spring'
~~~~~~~~~~~~~~~~~~~
node_modules/@nivo/core/index.d.ts:253:12 - error TS1038: A 'declare' modifier cannot be used in an already ambient context.
253 export declare const defaultAnimate = true
~~~~~~~
node_modules/@nivo/core/index.d.ts:254:12 - error TS1038: A 'declare' modifier cannot be used in an already ambient context.
254 export declare const defaultMotionStiffness = 90
~~~~~~~
node_modules/@nivo/core/index.d.ts:255:12 - error TS1038: A 'declare' modifier cannot be used in an already ambient context.
255 export declare const defaultMotionDamping = 15
~~~~~~~
node_modules/@nivo/core/index.d.ts:257:12 - error TS1038: A 'declare' modifier cannot be used in an already ambient context.
257 export declare const motionDefaultProps = {
~~~~~~~
node_modules/@nivo/core/index.d.ts:257:47 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
257 export declare const motionDefaultProps = {
~
258 animate: true,
~~~~~~~~~~~~~~~~~~~~~~
...
261 config: 'default',
~~~~~~~~~~~~~~~~~~~~~~~~~~
262 }
~~~~~
node_modules/@nivo/core/index.d.ts:264:12 - error TS1038: A 'declare' modifier cannot be used in an already ambient context.
264 export declare const defaultMargin = {
~~~~~~~
node_modules/@nivo/core/index.d.ts:264:42 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
264 export declare const defaultMargin = {
~
265 top: 0,
~~~~~~~~~~~~~~~
...
268 left: 0,
~~~~~~~~~~~~~~~~
269 }
~~~~~
node_modules/@nivo/core/index.d.ts:280:46 - error TS2536: Type 'T' cannot be used to index type 'U'.
280 type Accessor<T, U> = T extends string ? U[T] : never
~~~~
node_modules/@nivo/core/index.d.ts:300:31 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
300 export const SvgWrapper = (
~
301 props: React.PropsWithChildren<{
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
307 }>
~~~~~~~~~~
308 ) => JSX.Element
~~~~~~~~~~~~~~~~~~~~
node_modules/@nivo/core/index.d.ts:308:10 - error TS2708: Cannot use namespace 'JSX' as a value.
308 ) => JSX.Element
~~~
node_modules/@nivo/core/index.d.ts:320:30 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
320 export const Container = (props: React.PropsWithChildren<ContainerProps>) => JSX.Element
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@nivo/core/index.d.ts:320:82 - error TS2708: Cannot use namespace 'JSX' as a value.
320 export const Container = (props: React.PropsWithChildren<ContainerProps>) => JSX.Element
~~~
node_modules/@nivo/core/index.d.ts:322:38 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
322 export const ResponsiveWrapper = (props: {
~~~~~~~~~
323 children: (dimensions: { width: number; height: number }) => JSX.Element
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
324 }) => JSX.Element
~~~~~~~~~~~~~~~~~~~~~
node_modules/@nivo/core/index.d.ts:324:11 - error TS2708: Cannot use namespace 'JSX' as a value.
324 }) => JSX.Element
~~~
node_modules/@nivo/radar/index.d.ts:22:16 - error TS2314: Generic type 'InheritedColorConfig' requires 1 type argument(s).
22 color: InheritedColorConfig
~~~~~~~~~~~~~~~~~~~~
node_modules/@nivo/radar/index.d.ts:24:22 - error TS2314: Generic type 'InheritedColorConfig' requires 1 type argument(s).
24 borderColor: InheritedColorConfig
~~~~~~~~~~~~~~~~~~~~
node_modules/@nivo/radar/index.d.ts:44:23 - error TS2314: Generic type 'InheritedColorConfig' requires 1 type argument(s).
44 borderColor?: InheritedColorConfig
~~~~~~~~~~~~~~~~~~~~
node_modules/@nivo/radar/index.d.ts:54:20 - error TS2314: Generic type 'InheritedColorConfig' requires 1 type argument(s).
54 dotColor?: InheritedColorConfig
~~~~~~~~~~~~~~~~~~~~
node_modules/@nivo/radar/index.d.ts:56:26 - error TS2314: Generic type 'InheritedColorConfig' requires 1 type argument(s).
56 dotBorderColor?: InheritedColorConfig |
I just found a PR that might fix some/all of our issues: #1386 Not sure what needs to happen to get it released though.. Also of note, from the above PR, if you set |
If u set skipLibCheck,tsc will ignore all .d.ts files, so there is no error message |
Go to #1386 and give some ❤️ , hopefully it will be merged as soon as possible :) |
My I also notice that |
This is fixed in the latest version. |
Describe/explain the bug
When I run tsc in my project,it show the error that
To Reproduce
Steps to reproduce the behavior:
@nivo/calendar
and@nivo/core
@nivo/calendar
tsc
Expected behavior
no error
Screenshots
The text was updated successfully, but these errors were encountered: