typescript-example
typescript-example copied to clipboard
Add `esnext.asynciterable` to address "Cannot find name 'AsyncIterableIterator'"
This pull request address "Cannot find name 'AsyncIterableIterator'".
Steps to reproduce
- Create a test database
% mysql -uroot -p
Enter password:<Return without any password>
mysql> create database test;
mysql> exit;
- Clone this repository and follow the README
% node -v
v16.13.2
% npm -v
8.1.2
git clone https://github.com/typeorm/typescript-example.git
cd typescript-example
npm I
- Edit
ormconfig.json
to connect to MySQL
% git diff
diff --git a/ormconfig.json b/ormconfig.json
index bc033b8..1560148 100644
--- a/ormconfig.json
+++ b/ormconfig.json
@@ -3,8 +3,8 @@
"type": "mysql",
"host": "localhost",
"port": 3306,
- "username": "test",
- "password": "test",
+ "username": "root",
+ "password": "",
"database": "test",
"synchronize": true,
"logging": false,
%
- npm start
% npm start
> [email protected] start
> tsc && node src/index.js
node_modules/typeorm/driver/mongodb/typings.d.ts:4288:13 - error TS2339: Property 'asyncIterator' does not exist on type 'SymbolConstructor'.
4288 [Symbol.asyncIterator](): AsyncIterableIterator<T>;
~~~~~~~~~~~~~
node_modules/typeorm/driver/mongodb/typings.d.ts:4288:31 - error TS2304: Cannot find name 'AsyncIterableIterator'.
4288 [Symbol.asyncIterator](): AsyncIterableIterator<T>;