node-sql-template-strings icon indicating copy to clipboard operation
node-sql-template-strings copied to clipboard

Typescript

Open felixfbecker opened this issue 8 years ago • 4 comments

Been thinking about moving the project to TypeScript as I maintain a .d.ts file anyway and the code is so simple it's like maintaining the same file 2 times.

Cannot target ES6 though because Node 4 is missing default and variadic params.

felixfbecker avatar Aug 26 '16 11:08 felixfbecker

You can target to es6 and then use babel with "babel-plugin-env" targeting to node4.

Strate avatar Mar 12 '17 21:03 Strate

I know, but I don't want to do two-step compilation.

felixfbecker avatar Mar 12 '17 21:03 felixfbecker

@felixfbecker what if target to es5?

Strate avatar Mar 13 '17 07:03 Strate

https://github.com/postgraphql/postgraphql/pull/305 heres an example of typescript targeting es6 now targting es5.

thewillhuang avatar Apr 02 '17 18:04 thewillhuang