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.
  • Loading branch information
Mersho committed Oct 25, 2023
1 parent 3f888cb commit 80f2f6b
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 62 deletions.
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"strict": true,
"esModuleInterop": 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 80f2f6b

Please sign in to comment.