Differences between Typescript, Tsc, and Ntypescript

It all began when the command tsc --init refused to work...

I'm curious, what sets apart these three commands:

npm install -g typescript
npm install -g tsc
npm install -g ntsc

Initially, I assumed "tsc" was just an abbreviation for typescript, but listing them out reveals potential differences in versions.

PS C:\angular2-app> npm list -g tsc
C:\Users\Wheeeeee\AppData\Roaming\npm
└── [email protected]

PS C:\angular2-app> npm list -g typescript
C:\Users\Wheeeeee\AppData\Roaming\npm
└── [email protected]

So, what exactly distinguishes between the two. Could it be that typescript is the library while tsc serves as some sort of command line assist?

P.S. Not overly concerned about ntsc, just throwing it in the mix in case you have any insights on it. Otherwise, feel free to disregard.

EDIT: With the response below in mind, how does Powershell discern which tsk I am attempting to utilize? How can I specify?

Answer №1

tsc refers to a package with an identical name as the TypeScript compiler used in the command line interface. On the other hand, typescript is the official package for TypeScript.

Answer №2

When it comes to choosing the latest version for TypeScript, there are a few options available:

./node_modules/.bin/tsc --help
Version 1.5.3 (from <a href="https://github.com/basarat/tsc" rel="nofollow noreferrer">https://github.com/basarat/tsc</a>)
./node_modules/.bin/tsc --help
Version 2.5.0 (from <a href="https://github.com/basarat/ntypescript" rel="nofollow noreferrer">https://github.com/basarat/ntypescript</a>)
./node_modules/.bin/tsc --help
Version 4.0.2 (from <a href="https://github.com/Microsoft/TypeScript" rel="nofollow noreferrer">https://github.com/Microsoft/TypeScript</a>)

All these versions are connected in some way. Initially created by https://github.com/basarat, the project eventually gained sponsorship from Microsoft https://github.com/Microsoft/TypeScript.

If you want the most advanced features, using

"typescript": "latest"
is the way to go. It's recommended to stick with this option for the best experience.

Additionally, the list of supported targets and libraries is continuously updated for

"typescript": "latest"
.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Firestore rule rejecting a request that was meant to be approved

Recently, I came across some TypeScript React code that fetches a firestore collection using react-firebase-hooks. Here's the snippet: const [membersSnapshot, loading, error] = useCollectionData( query( collection(db, USERS_COLLECTION).withConve ...

How can union types be used correctly in a generic functional component when type 'U' is not assignable to type 'T'?

I've been researching this issue online and have found a few similar cases, but the concept of Generic convolution is causing confusion in each example. I have tried various solutions, with the most promising one being using Omit which I thought would ...

Angular 5 offers the ability to incorporate dynamic checkbox input into your application

Here is my code snippet: <input [type]="'checkbox'" [(ngModel)]="inputValue"> <p>Value: {{ inputValue }}</p> I'm puzzled as to why the value in inputValue remains unchanged. Can anyone shed light on this? I am unable to ...

Encountering issues with React Nextjs - unable to utilize useState hook or

Hi everyone, I'm new to React and I think I might have overlooked something. I've been trying to create a simple registration form, but it seems like I'm having trouble changing the state. ` import {useState} from 'react' export ...

After updating the file path, the Next.Js module couldn't be located: Module not found – Unable to

After relocating the EmptyTable.tsx file from its original directory at views/forms-tables/tables/react-table/EmptyTable to a new location at components/Tables/EmptyTable, I encountered a persistent issue. Despite updating the import path in my code to mat ...

Angular 12 is throwing an error due to the undefined @Input property

The issue presents a simple problem to comprehend yet proves challenging to resolve. There are 2 key components involved: CustomerComponent (Parent) InvoiceComponent (Child) Currently, I'm passing customer details using <admin-invoice-form [custo ...

An Unexpected Typescript Error Occurred While Creating an RxCollection With RxDB

I'm new to RxDB and I've come across a strange Typescript error in my Electron project. Here are the relevant parts of my code: import RxDB, { RxCollection, RxDatabase } from "rxdb"; RxDB.plugin(require("pouchdb-adapter-idb") ...

Generate an observable by utilizing a component method which is triggered as an event handler

My current component setup looks like this: @Component({ template: ` ... <child-component (childEvent)="onChildEvent()"></child-component> ` }) export class ParentComponent { onChildEvent() { ... } } I am aiming to ...

Leverage a function in an external JavaScript file within Angular 4

I am facing an issue while attempting to integrate a JavaScript file into my angular component. I have successfully loaded the full minified version from this source: https://github.com/blueimp/JavaScript-Load-Image/blob/master/js/load-image.all.min.js and ...

Customizing the colors of Angular Material themes

Currently, I am looking to completely change the theme of my angular 8 application. Within a scss file, I have the following code: @import '~@angular/material/theming'; // Plus imports for other components in your app. // Include the common st ...

Utilize Angular 2 with Google Maps Places Autocomplete to dynamically update an input field with location suggestions [DOM manipulation]

Recently, I have been utilizing the "Angular 2 + Google Maps Places Autocomplete" search functionality. Essentially, it involves an input field that looks like this: <input placeholder="search your location" autocorrect="off" autocapitalize="off" spell ...

The footer moves upwards when a file is downloaded

I am facing an issue with my website footer and its CSS styling. #footer { position: absolute; bottom: 0; width: 100%; height:8rem; } The main goal is to keep the footer at the bottom of the page, regardless of the amount of content on th ...

Discover the magic of integrating FeathersJS REST functionality within Angular with these simple steps

I've encountered a challenge while trying to make Feathers work in Angular with a Feathers REST server. It seems that no requests are being made. My Feathers server hosts the resource http://example.com/app/experiences which returns data in paginated ...

Issue with OpenAI's Rate Limit 429 Restriction

I've been experimenting with this repository in order to implement semantic search for YouTube videos using OpenAI + Pinecone. However, I keep encountering a 429 error at the following step - "Run the command npx tsx src/bin/process-yt-playlist.ts to ...

Is it possible to transfer files using Angular 2?

Currently, I am utilizing Angular2 and TypeScript to transmit a file in conjunction with JSON Data to a designated server. HTML Code <input type="file" class="form-control" name="avatar" id="uploadyour" name="uploadyour" #uploadyour="ngModel" [(ngMode ...

Angular: handling HTTP errors gracefully in the chain of operations

I am facing an issue where I need to treat specific HTTP error codes as non-errors and handle their responses normally. To achieve this, I implemented an HttpInterceptor to catch 500 status codes and return the original response that Angular stores in erro ...

What is the process for parameterizing a tuple in coding?

In my scenario, I have a tuple with interrelated types. Specifically, it involves an extractor function that retrieves a value, which is then used as input for another function. What I envision conceptually looks like this code snippet, although it does n ...

What is the best way to work with the INITIAL_STATE injection token when it has dependencies

I have a dynamic module that loads lazily and uses ngrx/store with the feature StoreModule.forFeature('tasks', tasksReducer). To initialize this module, I need to set some initial values that are obtained through dependency injection from another ...

Creating a fake Angular2-toaster component for Jasmine Unit testing

Seeking advice: How can I simulate an external Angular2 library for testing purposes? Currently, my application utilizes Angular2-toaster to display popup messages. While attempting to write a unit test suite using Jasmine for one of the components, I tri ...

When attempting to update Ionic2 from BETA11 to RC0, the error "bundle failed: 'InMemoryBackendService' is not exported" was encountered

An error occurred while bundling the application: 'InMemoryBackendService' is not exported by node_modules\angular2-in-memory-web-api\index.js (imported by src\app\app.module.ts). For assistance with resolving this ...