IntersectMBO / cardano-addresses

Addresses and mnemonic manipulation & derivations
Apache License 2.0
145 stars 46 forks source link

`dist/cardano-addresses.d.ts` has broken references on `src/*.ts` files #237

Closed Renegatto closed 11 months ago

Renegatto commented 1 year ago

How to reproduce

Compile ts source code with tsx

Expected behavior

Compiled successfully

Actual behavior

The compilation error:

node_modules/cardano-addresses/dist/cardano-addresses.d.ts:1:22 - error TS6053: File '/home/alexey/my-project/node_modules/cardano-addresses/dist/src/foreign.d.ts' not found.

1 /// <reference path="src/foreign.d.ts" />
                       ~~~~~~~~~~~~~~~~

node_modules/cardano-addresses/dist/cardano-addresses.d.ts:8:37 - error TS2307: Cannot find module './foreign' or its corresponding type declarations.

8 import { CardanoAddressesApi } from './foreign';
                                      ~~~~~~~~~~~

How to fix

Fixing paths fixing the compilation error:

/// <reference path="../src/foreign.d.ts" />
/**
 * Typescript bindings for `Cardano.Address`.
 *
 * @module
 */
import { Address, XPub, InspectAddress } from './types';
import { CardanoAddressesApi } from '../src/foreign';