Skip to content

Commit fad3a76

Browse files
jeffcharlesdcodeIO
authored andcommitted
Use ES2016 as target for src and transforms (AssemblyScript#987)
1 parent c9c1e6f commit fad3a76

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

NOTICE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ under the licensing terms detailed in LICENSE:
1919
* Stephen Paul Weber <stephen.weber@shopify.com>
2020
* Jay Phelps <hello@jayphelps.com>
2121
* jhwgh1968 <jhwgh1968@protonmail.com>
22+
* Jeffrey Charles <jeffreycharles@gmail.com>
2223

2324
Portions of this software are derived from third-party works licensed under
2425
the following terms:

cli/asc.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ var assemblyscript, isDev = false;
4040
try { // `asc` on the command line without dist files
4141
require("ts-node").register({
4242
project: path.join(__dirname, "..", "src", "tsconfig.json"),
43-
skipIgnore: true
43+
skipIgnore: true,
44+
compilerOptions: { target: "ES2016" }
4445
});
4546
require("../src/glue/js");
4647
assemblyscript = require("../src");
@@ -286,7 +287,9 @@ exports.main = function main(argv, options, callback) {
286287
let transformArgs = args.transform;
287288
for (let i = 0, k = transformArgs.length; i < k; ++i) {
288289
let filename = transformArgs[i].trim();
289-
if (/\.ts$/.test(filename)) require("ts-node").register({ transpileOnly: true, skipProject: true });
290+
if (/\.ts$/.test(filename)) {
291+
require("ts-node").register({ transpileOnly: true, skipProject: true, compilerOptions: { target: "ES2016" } });
292+
}
290293
try {
291294
const classOrModule = require(require.resolve(filename, { paths: [baseDir, process.cwd()] }));
292295
if (typeof classOrModule === "function") {

src/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"compilerOptions": {
44
"outDir": "../out",
55
"allowJs": false,
6-
"sourceMap": true
6+
"sourceMap": true,
7+
"target": "ES2016"
78
},
89
"include": [
910
"./**/*.ts"

0 commit comments

Comments
 (0)