Trouble with getting 'files.exclude' to work in Visual Studio Code

Recently, I made changes to my files.exclude user settings in Visual Studio Code to hide .js and .map files, which were working fine yesterday. However, today, without restarting or closing the application, it suddenly stopped working.

Here is the complete settings.json file:

// Customize your settings in this file to override default configurations
{
    "files.exclude": {
        "app/*.js": true,
        "app/*.map": true
    }
}

Any ideas on how to resolve this issue?

Answer №1

After including "**/" before each exclude, I was able to successfully get it working. It seems like the issue may have stemmed from how I initially opened the project, leading me to overlook the inclusion of the parent folder in the project structure.

Answer №2

Even though you may have found the answer already, I wanted to share this solution in case it helps others. The following code snippet worked for me:

"**/app/*.js": {"when": "$(basename).ts"} or

"**/app/**/*.js": {"when": "$(basename).ts"}

Answer №3

Currently, I am utilizing VSCode version 1.47.3, as of the year 2020, and it is proving to be highly efficient for working with typescript.

"files.exclude": {
  "**/*.js": { "when": "$(basename).ts" }
}

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

Incompatible parameter type for the Angular keyvalue pipe: the argument does not match the assigned parameter type

I need to display the keys and values of a map in my HTML file by iterating over it. To achieve this, I utilized Angular's *ngfor with the keyvalue pipe. However, I encountered an error when using ngFor: The argument type Map<string, BarcodeInfo ...

When using TypeORM, make sure to include the "WHERE IN (...)" clause in the query condition only if there is a value associated with it

In my TypeScript node.js project using TypeORM (v0.2.40), I have a query to find a record in the database based on specific criteria: userRepository.find({ where: { firstName: 'John', company: 'foo' } }); This executes the following SQ ...

How to Use AngularJS $http Mock Respond to Simulate a Response with a `location` Header?

One interesting scenario I have encountered involves an API that returns a status code of 202 with no data. However, the response includes a header called "Location" which points to a specific URL. After browsing through the $httpBackend respond(...) docu ...

Unexpected token error on an optional property in Visual Studio Code

I encountered a problem with a project I cloned. Below is the code snippet created using this project: https://github.com/enuchi/React-Google-Apps-Script export interface Vehicle { wheels: number; insurance?: string; } export default class Car { whe ...

Cannot locate AngularJS + Typescript controller

I'm encountering an error while attempting to integrate TypeScript with AngularJS. The issue I'm facing is: Error: [$controller:ctrlreg] The controller named 'MyController' has not been registered Does anyone have any insights on what ...

What is the best way to upload mp3 files using Angular?

Hello, I am a beginner with Angular and I could use some guidance. I am looking to upload mp3 files from my Angular application and then send them to the backend to be saved in my local database. Any tips or suggestions on how I can achieve this would be ...

Is it possible to establish a direct connection with a MySQL database using AngularJS?

Is there a way to directly connect AngularJS code to a MySQL database, or do I need to use Node.js or PHP as an intermediary? Appreciate the help! ...

Is it possible to encounter an unusual token export while trying to deactivate Vue with veevalidate

Utilizing Nuxt with server side rendering. Incorporating Typescript along with vee-validate version 3.4.9. The following code has been validated successfully extend('positive', value => { return value >= 0; }); Upon adding the default, ...

Is it possible to determine when a component has completed its rendering process in Angular?

I am currently working on an Angular application where I have a page component that contains several subcomponents. Each subcomponent is set up to fetch data from an API in the ngOnInit method, causing a layout shift issue as they load at different speeds ...

Executing a function in a controller from a template only when a certain variable is true

Here is a row that I have: <a class="btn btn-default btn-xs" ng-click="list.showReview = list.showReview == $index ? -1 : $index; getValues(object.Id); "><i class=" glyphicon glyphicon-list-alt"></i></a> I am looking to only call ...

The $modal popup function does not recognize the scope value as an object when it is undefined

I'm facing an issue with my code that involves using a $uibModal popup to add a new record. Despite passing the scope object into the function to save it, I keep getting 'undefined' as the result. Below is the code snippet along with the [pl ...

Issues with ng-repeat not functioning properly within a Popover

I have a list that I am looping through using ng-repeat: <div class="row msf-row" ng-repeat="record in recordlist people-popover> <div class="col-md-1 msf-centered" ng-show="editItem == false" ng-hide="editItem"> <button class="btn ...

Angular 5 - Implementing "similar to %" Filter (similar to SQL)

I have created a method in my code to filter an array based on a specific type. filterByType(type: string) { console.log("Filtering by type"); this.filteredArray = null; this.filteredArray = this.mainArray.filter((item: Item) => item.type === type); t ...

Tips for implementing a multi-layered accumulation system with the reduce function

Consider the following scenario: const elements = [ { fieldA: true }, { fieldB: true }, { fieldA: true, fieldB: true }, { fieldB: true }, { fieldB: true }, ]; const [withFieldA, withoutFieldA] = elements.reduce( (acc, entry) => ...

ngx-charts-pie-chart angular5 library data structure

I am utilizing the ngx-charts library in my current project. When using the onSelect method, I noticed that it only returns an object with attributes value and name, even though my list contains three attributes: value, name, and id. Upon examining the s ...

Include a personalized header when making an HTTP GET request with AngularJS

This is my angularjs request. var req = { method: 'GET', url: 'http://localhost:8080/test', headers: { "x-auth-token" : user.token } } ...

Unraveling the Perfect Jest Stack Trace

Currently, I am in the process of debugging some tests that were written with jest using typescript and it's causing quite a headache. Whenever a test or tested class runs Postgres SQL and encounters an error in the query, the stack trace provided is ...

Selecting options in an input field using AngularJS

In my AngularJS template, I have the code snippet below: <input type="number" id="exercise-log-duration-hours-{{ ::$id }}" class="form-control" ng-model="$ctrl.workoutHours" ng-change="$ctrl.updateHours($ctrl.workoutHours)" name ...

Combining a pair of canvases

Currently, I am utilizing a JavaScript library to create a QR Code. This library generates the QR code by displaying it on a canvas. Nevertheless, my goal is to integrate a background behind this QR Code. I attempted to achieve this by first drawing the b ...

Discover the wonders of utilizing @blur events on your custom Vue components!

Trying to create a customized component that mimics an input field with validation, I'm encountering issues with getting @Change, @blur, and other events to function properly as they would on a standard input field. This is the structure of my custom ...