Skip to content

Commit

Permalink
util/index: convert js to ts
Browse files Browse the repository at this point in the history
The languageModel & fiatModel interface created to type-check
the data and ensure that it conforms to
the expected structure and format.
This can help you avoid errors and bugs when
working with the data in your code.
This commit enables resolveJsonModule to import module
with '.json' extension.

Co-authored-by: webwarrior <[email protected]>
  • Loading branch information
Mersho and webwarrior-ws committed Aug 26, 2024
1 parent 1ca8f7a commit 5636ae8
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 80 deletions.
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"compilerOptions": {
"strict": true,
"esModuleInterop": true,
"resolveJsonModule": true
}
}
4 changes: 4 additions & 0 deletions util/fiatModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ export interface IFiat {
price?: boolean;
locale?: string;
}

export interface IFiatCurrencies {
[key: string]: IFiat;
}
Loading

0 comments on commit 5636ae8

Please sign in to comment.