Adding content to 103-running-typescript

pull/3423/head
syedmouaazfarrukh 2 years ago committed by Kamran Ahmed
parent 07f001f8be
commit d23ea8e577
  1. 22
      src/roadmaps/typescript/content/100-typescript/103-running-typescript/100-tsc.md
  2. 9
      src/roadmaps/typescript/content/100-typescript/103-running-typescript/101-ts-node.md
  3. 6
      src/roadmaps/typescript/content/100-typescript/103-running-typescript/102-ts-playground.md
  4. 18
      src/roadmaps/typescript/content/100-typescript/103-running-typescript/index.md

@ -1 +1,23 @@
# Tsc # Tsc
`tsc` is the command line tool for the TypeScript compiler. It compiles TypeScript code into JavaScript code, making it compatible with the browser or any JavaScript runtime environment.
You can use the `tsc` command to compile your TypeScript code by running the following command in your terminal or command prompt:
```
tsc
```
This command will compile all TypeScript files in your project that are specified in your `tsconfig.json` file. If you want to compile a specific TypeScript file, you can specify the file name after the `tsc` command, like this:
```
tsc index.ts
```
The `tsc` command has several options and flags that you can use to customize the compilation process. For example, you can use the `--target` option to specify the version of JavaScript to compile to, or the `--outDir` option to specify the output directory for the compiled JavaScript files.
You can run `tsc --help` to see a list of all the available options and flags.
Learn more from the following links:
- [tsc CLI Options](https://www.typescriptlang.org/docs/handbook/compiler-options.html#using-the-cli)

@ -1 +1,8 @@
# Ts node # Ts Node
TypeScript is a statically-typed language that can be used with the Flutter framework to build cross-platform mobile apps. TypeScript offers features such as type checking, classes, interfaces, and more, which can help improve the development process and catch errors early. It can be used in Flutter by integrating it with the Dart programming language through a tool called dart2ts. This allows developers to use TypeScript with Flutter and take advantage of its benefits while still using Dart for the underlying runtime.
Learn more from the following links:
- [TypeScript Node Explained *ts-node*](https://www.youtube.com/watch?v=22MpfOmemzY)
- [How To Run TypeScript Scripts with ts-node](https://www.digitalocean.com/community/tutorials/typescript-running-typescript-ts-node)

@ -1 +1,7 @@
# Ts playground # Ts playground
A TypeScript playground in Flutter refers to a development environment or an online tool that allows you to write, run, and debug TypeScript code in a Flutter environment. It's a way to test TypeScript code snippets and see the results immediately, without having to set up a full development environment or project. Some popular online TypeScript playgrounds for Flutter include Repl.it, CodeSandbox, and StackBlitz. These platforms provide an interactive development environment with all the necessary tools and features to write, test, and debug TypeScript code.
Learn more from the following links:
- [TypeScript - Playground](https://www.typescriptlang.org/play)

@ -1 +1,17 @@
# Running typescript # Running TypeScript
To run TypeScript code, you'll need to have a TypeScript compiler installed. Here's a general process to run TypeScript code:
1. Write TypeScript code in a .ts file (e.g. app.ts)
2. Compile the TypeScript code into JavaScript using the TypeScript compiler:
```
tsc app.ts
```
3. Run the generated JavaScript code using a JavaScript runtime environment such as Node.js:
```
node app.js
```
Learn more from the following link:
- [Running your TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-tooling-in-5-minutes.html#running-your-typescript-web-app)
Loading…
Cancel
Save