ccxt
ccxt copied to clipboard
tsc command fails (typescript v4.7.4) (ccxt v4.2.96)
Operating System
Mac OS / Linux
Programming Languages
JavaScript
CCXT Version
4.2.96
Description
tsc command in the parent project fails with the following error:
Code
> tsc
node_modules/ccxt/js/src/base/ws/Cache.d.ts:1:31 - error TS2314: Generic type 'Array<T>' requires 1 type argument(s).
1 interface CustomArray extends Array {
~~~~~
node_modules/ccxt/js/src/base/ws/OrderBookSide.d.ts:7:54 - error TS2314: Generic type 'IOrderBookSide<T>' requires 1 type argument(s).
7 declare class OrderBookSide extends Array implements IOrderBookSide {
~~~~~~~~~~~~~~
node_modules/ccxt/js/src/base/ws/OrderBookSide.d.ts:14:5 - error TS2416: Property 'store' in type 'CountedOrderBookSide' is not assignable to the same property in base type 'OrderBookSide'.
Type '(price: any, size: any, count: any) => void' is not assignable to type '(price: any, size: any) => void'.
14 store(price: any, size: any, count: any): void;
~~~~~
node_modules/ccxt/js/src/base/ws/OrderBookSide.d.ts:17:61 - error TS2314: Generic type 'IOrderBookSide<T>' requires 1 type argument(s).
17 declare class IndexedOrderBookSide extends Array implements IOrderBookSide {
~~~~~~~~~~~~~~
Found 4 errors in 2 files.
Errors Files
1 node_modules/ccxt/js/src/base/ws/Cache.d.ts:1
3 node_modules/ccxt/js/src/base/ws/OrderBookSide.d.ts:7
Hello @sainiankit, what's the tsc version used? Can you please share a small reproducible project?
Hi @carlosmiei !
Typescript version in the parent project is 4.8.4. (I have also tried 4.7.4, but no luck).
I've been using ccxt for a while. tsc
runs fine for me till ccxt version 4.2.45
, as soon as I update it to 4.2.46
. I start to receive this error after tsc
is run.
> tsc
node_modules/ccxt/js/src/base/ws/Cache.d.ts:1:31 - error TS2314: Generic type 'Array<T>' requires 1 type argument(s).
1 interface CustomArray extends Array {
~~~~~
Found 1 error in node_modules/ccxt/js/src/base/ws/Cache.d.ts:1
Let me create a reproducible project and share.
@sainiankit Thank you,
I'm just a bit lost because we use typescript 4.74 and we don't see that error, but we will try to update it and check that again.
Here is a simplified reproducible project: https://github.com/sainiankit/ccxt-test
Steps to reproduce:
1.) npm install
2.) npm run build
> [email protected] build
> tsc
node_modules/ccxt/js/src/base/ws/Cache.d.ts:1:31 - error TS2314: Generic type 'Array<T>' requires 1 type argument(s).
1 interface CustomArray extends Array {
~~~~~
node_modules/ccxt/js/src/base/ws/OrderBookSide.d.ts:7:54 - error TS2314: Generic type 'IOrderBookSide<T>' requires 1 type argument(s).
7 declare class OrderBookSide extends Array implements IOrderBookSide {
~~~~~~~~~~~~~~
node_modules/ccxt/js/src/base/ws/OrderBookSide.d.ts:14:5 - error TS2416: Property 'store' in type 'CountedOrderBookSide' is not assignable to the same property in base type 'OrderBookSide'.
Type '(price: any, size: any, count: any) => void' is not assignable to type '(price: any, size: any) => void'.
14 store(price: any, size: any, count: any): void;
~~~~~
node_modules/ccxt/js/src/base/ws/OrderBookSide.d.ts:17:61 - error TS2314: Generic type 'IOrderBookSide<T>' requires 1 type argument(s).
17 declare class IndexedOrderBookSide extends Array implements IOrderBookSide {
~~~~~~~~~~~~~~
Found 4 errors in 2 files.
Errors Files
1 node_modules/ccxt/js/src/base/ws/Cache.d.ts:1
3 node_modules/ccxt/js/src/base/ws/OrderBookSide.d.ts:7
@sainiankit Thank you we will check it out.
same issue here, any updates for this issue?
same issue
same issue
@sainiankit @0xchanning @PRICEKRAKEN @dorienh We will fix it shortly, sorry for the delay.
@sainiankit @0xchanning @PRICEKRAKEN @dorienh we just released a new version (4.3.29) with the fix.
Can you please update your ccxt version and try again?