How to compile multiple Typescript files into a single file?

devquora
devquora

Posted On: Feb 22, 2018

 

    1 Answer Written

  •  devquora
    Answered by devquora

    To compile multiple TypeScript files into a single file, use the TypeScript compiler (tsc) with the --outFile or --out option. First, create an output file, then navigate to the directory containing your TypeScript files in a terminal window. Finally, run the tsc command followed by the --outFile or --out option and the name of the output file, followed by the names of the TypeScript files you want to compile, separated by spaces. For example, tsc --outFile app.js file1.ts file2.ts.

Related Questions

Please Login or Register to leave a response.

Related Questions

Typescript Interview Questions

What is Typescript?

Typescript is a free and open-source programming language which is designed and developed by Microsoft. It was designed ..

Typescript Interview Questions

List some features of Typescript?

Features of Typescript are:- Typescript can be compiled to all major versions of Javascript(ES3,ES5,ES6,ES7). Typescrip..

Typescript Interview Questions

List some benefits of using Typescript?

Following are some benefits of using Typescript One of the biggest advantages of Typescript is its code completion and ..