Skip to content

Commit 51ef761

Browse files
committed
feat: generate declaration files
1 parent e91501d commit 51ef761

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"module": "CommonJS",
77
"outDir": "./dist",
88
"rootDir": "./src",
9+
"declaration": true,
910
"esModuleInterop": true
1011
},
1112
"include": ["src/index.ts", "types/*.d.ts"],

types/coininfo.d.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
declare module "coininfo" {
2-
interface Network {
2+
export interface Network {
33
messagePrefix: string;
44
bech32: string;
55
bip32: Bip32;
@@ -8,23 +8,23 @@ declare module "coininfo" {
88
wif: number;
99
}
1010

11-
interface Bip32 {
11+
export interface Bip32 {
1212
public: number;
1313
private: number;
1414
}
1515

16-
interface CoinInfo {
16+
export interface CoinInfo {
1717
main: {
1818
toBitcoinJS: () => Network;
1919
};
2020
}
2121

22-
interface Coins {
22+
export interface Coins {
2323
bitcoin: CoinInfo;
2424
dash: CoinInfo;
2525
dogecoin: CoinInfo;
2626
}
2727

2828
const coininfo: Coins
29-
export = coininfo;
29+
export default coininfo;
3030
}

0 commit comments

Comments
 (0)