wavesplatform / waves-signature-generator

4 stars 15 forks source link

TS2322: Type 'undefined' is not assignable to type #24

Closed dractw closed 5 years ago

dractw commented 5 years ago

Facing issue when trying to install @waves/signature-adapter via yarn or npm when it

> @waves/signature-adapter@4.3.0 compile
> tsc

src/utils.ts:119:5 - error TS2322: Type 'IFeeConfigItem[T] | undefined' is not assignable to type 'IFeeConfigItem[T]'.
  Type 'undefined' is not assignable to type 'IFeeConfigItem[T]'.
    Type 'undefined' is not assignable to type '(BigNumber & false) | (BigNumber & true)'.

119     return isEmpty(value) ? path(['calculate_fee_rules', 'default', propertyName], config) : value;

Node 10.15.3

tsigel commented 5 years ago

Do not use tsc. Use node_modules/.bin/tsc or npm run build.

dractw commented 5 years ago

@tsigel this's happens when i'm trying it to install, so compile runs by itself.

After upgrading to latest @waves/signature-adapter@5.1.6 issue isn't relevant anymore. Thanks