In Visual Studio 2017, Intellisense defaults to using the oldest version of TypeScript available

I have a query about the Intellisense feature in Visual Studio 2017. I've installed the TypeScript SDK, specifically the latest Version (currently 2.5.3).

Here's my folder structure:

https://i.sstatic.net/mFPk0.png

When utilizing Intellisense, it suggests the oldest version to me:

https://i.sstatic.net/7kfYR.png

In the project properties, I've set the TypeScript version to 2.4.

How can I instruct Visual Studio to use the most recent version or the one specified in my tsconfig.json file instead of the outdated one?

I would appreciate any guidance pointing me in the right direction!

By the way, while moving the 2.1 folder out of the Typescript folder resolves this issue, I don't believe it is the correct solution.

Answer №1

If you're using Visual Studio 2017, updating TypeScript is a bit different from the process in Visual Studio 2015. The good news is that now you have the flexibility to install multiple TypeScript versions and select specific ones for each of your projects. For more detailed information on this topic, please refer to the documentation provided in this link: Updating TypeScript in Visual Studio 2017

For users with VS 2017 version 15.3 and onwards, the TypeScript version is tied to individual projects. Simply right-click on the project name, navigate to Properties > TypeScript Build tab, and then choose the desired TypeScript version or opt for "use latest available".

However, if you are using VS 2017 version 15.2 and earlier, the steps involve going to Tools > Options > Text Editor > JavaScript/TypeScript > IntelliSense and adjusting the Use TypeScript version setting to match your preference.

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

Firebase cloud function encountered an issue: Error: EISDIR - attempting to perform an unauthorized operation on a directory

I am currently working on a task that involves downloading an image from a URL and then uploading it to my Firebase cloud storage. Below is the code I have implemented for this process. import * as functions from 'firebase-functions'; import * a ...

The 'innerHTML' property is not present in the 'EventTarget' type

Currently, I am working with React and Typescript. My goal is to store an address in the localStorage whenever a user clicks on any of the available addresses displayed as text within p elements. <div className="lookup-result-container& ...

TypeScript's version of Java's enum (or C#'s structure)

I'm facing the challenge of creating an enum in Typescript that mimics the functionality of Java enums. In TypeScript, only integer-based enums like C# are supported, unlike in Java where we can have custom objects with non-integer related properties ...

Is it possible to specify the version of a dependency using Stackblitz?

Is it possible to specify the dependency version on StackBlitz? I recently updated the dependency on NPM, however StackBlitz seems to be stuck on installing the old version. ...

Declaring TypeScript functions with variable numbers of parameters

Is it possible to define a custom type called OnClick that can accept multiple types as arguments? How can I implement this feature so that I can use parameters of different data types? type OnClick<..> = (..) => void; // example usage: const o ...

What are the steps to utilizing mattooltip effectively?

Can someone help me figure out how to successfully implement mattooltip in this code? It's not working as expected. <div class="btn-edit-nounderline" matTooltipClass="custom-tooltip" (click)="edit(row.widgetAccess)" ...

What is the proper way to specify the type for a <video> element reference in React when utilizing Typescript?

I have been experimenting with controlling the play/pause state of a video in React.js using ref's. My code functions correctly but I am encountering tslint errors that I am currently trying to diagnose: function App() { const playVideo = (event:a ...

Input values that are true, or in other words, fulfill conditions for truthiness

Is there a specific data type in TypeScript to represent truthy values? Here's the method I'm working with: Object.keys(lck.lockholders).length; enqueue(k: any, obj?: any): void It seems like TypeScript allows checking for empty strings &ap ...

Utilizing the "key" prop in React by spreading it into JSX with the getInputProps method from @conform-to/react

I am facing an issue in React where a key prop is complained about being spread into a JSX element, even when it’s not explicitly passed as part of the props. Take a look at this code snippet: <Input className="mb-[20px]" label="Fi ...

I am unable to view the data in the autocomplete drop-down menu

I'm currently encountering an issue with my autocomplete feature. Whenever I click on the input field, a dropdown menu should appear with all available options to choose from. However, I am having trouble with the visibility of these fields. I have t ...

What is the best way to extract and display data from an API response object in my

{ "_metadata": { "uid": "someuid" }, "reference": [ { "locale": "en-us", ... bunch of similar key:value "close_icon_size" ...

How to update an Angular 2 component using a shared service

My question is regarding updating components in Angular 4. The layout of my page is as follows: Product Component Product Filter Component Product List Component I am looking to link the Product Filter and Product List components so that when a user c ...

Describing the Significance of a Component Value within the Document Object

Every time I call a specific component in the DOM using its selector, I want to customize it by altering certain variables. This component will serve as a generic "Input Field" that I can define with unique values each time I use it. I specifically want t ...

Navigating the parent scope in Angular using TypeScript

Is there a way to access the parent Controller's scope from within the TypeScript class? Here is the code snippet: export class EntityOverviewCtrl extends AbstractCtrl { public static $inject = ["$state", "$http", "CurrentSession"]; publi ...

Using `this` within an object declaration

I am encountering an issue with the following code snippet: const myObj = { reply(text: string, options?: Bot.SendMessageOptions) { return bot.sendMessage(msg.chat.id, text, { reply_to_message_id: msg.message_id, ...options }) ...

Enabling Cross-Site Request Forgery (CSRF) through Angular's HttpClientModule is causing an error message to appear: TS2552 -

As a novice in front-end development, I am looking to incorporate CSRF tokens into certain requests within a frontend application. The app is built using Angular version 12.2.17, and I am following the guidelines outlined in the Angular documentation: http ...

Attempting to use a string as an index for the type `{ firstName: { inputWarning: string; inputRegex: RegExp; }` is not allowed

const checkRegexSignUp = { firstName: { inputWarning: "only letters", inputRegex: /^[a-z ,.'-]+$/i }, lastName: { inputWarning: "only letters", inputRegex: /^[a-z ,.'-]+$/i }, } const change = (e: ChangeEvent<HT ...

Leverage the keyof operator for automatic determination of return type

My interface looks like this: interface ResourceState<ItemType> { rows: ItemType[], store: Record<String, ItemType> } To create a root state, I use the following structure: RootState{ car: ResourceState<Car> user: ResourceState<User&g ...

I am looking to conceal the y-axis labels and tooltip within the react chart

I am currently working with react-chart-2. I have a line graph that displays a tooltip when hovered over, but I would like to hide this tooltip feature. Additionally, I want to remove the numbers 0, 0.1, 0.2 up to 1 on the left side (y-axis) of the gra ...

Incorporating a d3 chart into an Angular 4 project

Currently, I am in the process of developing an Angular application using TypeScript. My aim is to incorporate a force directed network graph from Mike Boston built with d3, which can be viewed here. After successfully translating most of the code to Type ...