Category "typescript"

How to define Typescript Map of key value pair. where key is a number and value is an array of objects

In my angular2 app i want to create a map which takes a number as key and returns an array of objects. I am currently implementing in following way but no luck.

Is field initialization by another field permitted?

I'm trying to do this in my class: class Foo { _errorHappened = new Subject(); errorHappened = this._errorHappened.asObservable(); } I'm using a field'

How to use nestjs Logging service

I tried to use the internal Logger of nestjs (described on https://docs.nestjs.com/techniques/logger -> but with no description of how to use it) But I had

Two way data binding in model driven forms

I have a reactive form, in which, i have a first name, a last name and finally display name textbox. When i give first name and last name, the value of the disp

VsCode clean Typescript project no auto import suggestions

When I create a new Node project using Typescript, VsCode auto import suggestions do not work at all. Steps to reproduce: Create a workspace directory. Run n

reactstrap typescript nx `Uncaught ReferenceError: global is not defined`

I'm using [email protected] with nx and typescript. But if any component is included from reactstrap the app is crashing with below error index.js:3 Uncaught Ref

Typescript Equality issue on Material UI Autocomplete

Data is stored as: { iso: "gb", label: "United Kingdom", country: "United Kingdom" }, { iso: "fr", label: "France", country: "France" } Value passed to the

AngularFireList, property valueChanges() show the error Property 'query' is missing in type 'Observable<{}[]>

I'm having a hard time to figure out this error. Here is my code that I'm building in to make a AuthGuard service: user.service.ts: import { Injectable } from

Error with Typescript Pact.io test: PopsicleError: Unable to connect to

Expected: Running npm run pactTest should generate a pact file (JSON). Results: I get an Unable to connect error. Pact.io JavaScript implementation guide. Pa

TypeScript type definitions IntelliSense errors

With Visual Studio 2022, I have a lot of IntelliSense errors in the error list window about type definitions of the node_modules folder. In my tsconfig.json fil

How do I make the correct call from services using Angular?

Below, I have created a service of name util.service to call in manage-actives-crud.component.ts inside ngOnInit . Saying that everything that is different from

Cannot find module 'vscode' in language server extension

We made a copy of the lsp sample project, and in server.ts we are importing the @types/vscode package to access the Range interface when creating Diagnostic ins

How to bind the dropdown lists based on selecting the items from the dropdowns

I have one dropdown which I have to show this dropdown from constant.ts file And In second dropdown I have to show the dropdown based on the selecting the first

Missing necessary OAuth permissions on GCP Pub/Sub

I'm trying to follow this guide here to get push notifications whenever a response has been submitted on a Google Forms form. All prerequisites have been comple

What is the shortcut in Visual Studio Code for console.log

I want to know what is the shortcut for console.log in Visual Studio code?

Index elastic problem to scroll with Typescript, and with node and Express

I use the Javascript client of elastic search to index and search my data and I have a problem to use the scroll method. I can't set the right index but I know

Angular Compile Error: NG6001: The class is listed in the declarations of the NgModule 'AppModule', but is not a directive, a component, or a pipe

App fails to compile with error error NG6001: The class NavigationMenuItemComponent is listed in the declarations of the NgModule AppModule, but is not a dire

How do I compile my TypeScript code for Node.js to one file?

I want to compile TypeScript to one file when using with Node.js. I have tried configuring "tsconfig.json" like this: "compilerOptions": { "module": "common

firebase signOut() method doesn't sign out

I use firebase v9 and created a react hook for convenient verification of user authorization. After authorization, I can't log out on the page as if the signOut

CORS is somehow stopping my Angular and Nestjs apps from communicating

I'm building an app with Angular and NestJS using NGXS for state management. I got everything set up and served my application and got this error in the consol