From f17293ec4b720d03f82565d6e030c5ec9237edee Mon Sep 17 00:00:00 2001 From: LuckyWind_sck Date: Mon, 3 May 2021 14:07:52 +0900 Subject: [PATCH] build: change ts target from es5 to ES2020 Code is executed in nodeJS, so we can raise the target version. Also, this patch prevent the sequelize error below: `Class constructor Model cannot be invoked without 'new'` Solution: https://github.com/sequelize/sequelize/issues/7840#issuecomment-317212324 --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index a378e24..d6b5ddb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "ES2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */