Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to compile typescript to javascript es6

Run $tsc —init (in the folder containing the typescript file to compile)
(this creates a tsconfig.json file which has a bunch of json settings)
Navigate to tsconfig.json
 and 
Change from “target”: “es5”  to “target”: “es6”
Recompile the typescript file by tsc index and the index.js file will have es
Comment

PREVIOUS NEXT
Code Example
Javascript :: What are "res" and "req" parameters in Express functions 
Javascript :: React closing a dropdown when click outside 
Javascript :: open window in same tab 
Javascript :: Getting One Value from an Array of Items 
Javascript :: how to use ejs with client side ejs 
Javascript :: Agora Video Calls 
Javascript :: electron js 
Javascript :: buffer concat nodejs 
Javascript :: syntax of ternary operator in javascript 
Javascript :: metadata object ANGULAR 
Javascript :: createtextnode javascript 
Javascript :: react.dom 
Javascript :: math. javascript 
Javascript :: js keycodes 
Javascript :: padstart in javascript 
Javascript :: html table to csv javascript 
Javascript :: use index of an array within a for loop 
Javascript :: create react app 
Javascript :: update state in react 
Javascript :: map.set javascript 
Javascript :: react-native-image-viewing 
Javascript :: javascript spread syntax 
Javascript :: Javascript first example 
Javascript :: how to get checked and unchecked checkbox value in jquery 
Javascript :: javascript classes 
Javascript :: convert all styles to inline style javascript 
Javascript :: passport local 
Javascript :: stripe subscription node js 
Javascript :: how to create angular project in visual studio code windows 10 
Javascript :: template literals js 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =