From 78649ba82d666dc2ea8008fbc0c77fc17fab1ba2 Mon Sep 17 00:00:00 2001 From: Eugene Trifonov Date: Mon, 7 Oct 2024 12:11:17 +0300 Subject: [PATCH 1/2] fixed the ES modules error by adding tsconfig.json --- 01-wallet/index.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/01-wallet/index.md b/01-wallet/index.md index 70b0200..bbe61c7 100644 --- a/01-wallet/index.md +++ b/01-wallet/index.md @@ -125,6 +125,22 @@ Let's create a new directory for our project and support TypeScript. Open termin npm install ts-node ``` +We also need to add a configuration file. Create the file `tsconfig.json` with the following content: + +``` + { + "compilerOptions": { + "module": "commonjs", + "esModuleInterop": true, + "target": "es6", + "moduleResolution": "node", + "sourceMap": true, + "outDir": "dist" + }, + "lib": ["es2015"] + } +``` + --- library:npmton --- From cb1b9eff5122f8e79ed5c6b20fb9ce5a3fa9c766 Mon Sep 17 00:00:00 2001 From: Eugene Trifonov Date: Mon, 7 Oct 2024 12:16:55 +0300 Subject: [PATCH 2/2] added tsconfig.json to the test directories --- 01-wallet/test/npmton/tsconfig.json | 11 +++++++++++ 01-wallet/test/tonweb/tsconfig.json | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 01-wallet/test/npmton/tsconfig.json create mode 100644 01-wallet/test/tonweb/tsconfig.json diff --git a/01-wallet/test/npmton/tsconfig.json b/01-wallet/test/npmton/tsconfig.json new file mode 100644 index 0000000..bd2ebf9 --- /dev/null +++ b/01-wallet/test/npmton/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "module": "commonjs", + "esModuleInterop": true, + "target": "es6", + "moduleResolution": "node", + "sourceMap": true, + "outDir": "dist" + }, + "lib": ["es2015"] + } \ No newline at end of file diff --git a/01-wallet/test/tonweb/tsconfig.json b/01-wallet/test/tonweb/tsconfig.json new file mode 100644 index 0000000..bd2ebf9 --- /dev/null +++ b/01-wallet/test/tonweb/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "module": "commonjs", + "esModuleInterop": true, + "target": "es6", + "moduleResolution": "node", + "sourceMap": true, + "outDir": "dist" + }, + "lib": ["es2015"] + } \ No newline at end of file