Category "typescript"

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

TS ERR_REQUIRE_ESM -> Cannot use import statement outside a module -> ERR_UNKNOWN_FILE_EXTENSION -> repeat

I've been stuck in an error cycle for hours. I want to have a TypeScript project but each "solution" to each error just moves to another error and it cycles. It

Angular: HttpClientModule import error (could not be resolved to an NgModule class)

I was trying to build a simple app with crud on fake json server but i can't import HttpClientModule Here is error message from VS Code : ERROR in node_modul

Rxjs - resubscribe to unsubscribed Observable

I'm using a Service to "ping" my server every 2.5s, returning the response time from my server. Therefore I am using observables. I am also using angular 2 an

TypeScript `extend` produces ESLint error when extending a template string?

I want to implement a type TrimStart like this: type TrimStart<T extends string> = T extends ` ${infer Rest}` ? TrimStart<Rest> : T; type TT = Trim

TypeError: L.Control.Draw is not a constructor

I wanted to draw a polygon in the leaflet map in my ionic2 app, for that I found leaflet-draw pluggin, but I am getting this error TypeError: L.Control.Draw is

What is reason to use is operator in TypeScript?

What is reason to use is operator in TypeScript in this case? type Species = "cat" | "dog"; interface Pet { species: Species } interface Cat extends Pet

Typescript file-naming conventions

I'm looking for the Typescript file-naming conventions, specifically for a file which stores only types and interfaces. Now, I've found a couple of Typescript

Disable PrimeNG Calendar month selection in Typescript

I am using PrimeNg Calendar in my angular 7 project, wanted to disable month navigator on some conditions at the component level. Ex: Current Month is February