Category "typescript"

Intercepting in Multer Mutates Request? (NestJS)

Does multer mutates any request that has given to it? I'm currently trying to intercept the request to add this in logs. But whenever I try to execute this code

Ordering member for async and method in Typescript-ESLint

Is there a way for ordering async / sync method member ? example # ❌ Incorrect function myFunction() { // something code } async function myAsyncFunct

How to pretty print clean typescript errors in vscode?

I find the inline error popup in vscode useless because it's so unreadable, are there any plugins that prints cleaner inline errors?

How do I configure absolute paths for imports in TypeScript based React Native apps?

In order to avoid '../../../../' style relative imports in a TypeScript based React Native app, I would like to configure the app so that I can use absolute imp

Property `user` does not exist on type `Session & Partial<SessionData>`

I had a code in javascript and I'm trying to convert it to typescript route.get('/order', async(req,res) => { var sessionData = req.session; if(typ

How to get query parameters from URL in Angular 5?

I'm using angular 5.0.3, I would like to start my application with a bunch of query parameters like /app?param1=hallo&param2=123. Every tip given in How to

Only allow specific components as children in React and Typescript

I would like to only allow specific components as children. For example, let's say I have a Menu component, that should only contain MenuItem as children, like

Jest finds tests but doesn't collect coverage

I trying to collect test coverage for this project using yarn test --coverage # i.e. "react-scripts test --coverage" My jest config is this: "jest": {

TS2339: Property 'comparePassword' does not exist on type 'Model<Document, {}>'

I have defined a schema method by using this code. While I use in the service. It is showing a error. // model export interface User extends mongoose.Document

"React has detected a change in the order of Hooks" but Hooks seem to be invoked in order

I am trying to use Context and Reducers via React's hooks, and running into problems with the order of the hooks not being constant. My understanding was that a

Argument of type 'string | null' is not assignable to parameter of type 'string'. Type 'null' is not assignable to type 'string'

I have a dotnetcore 20 and angular4 project that I am trying to create a userService and get the user to my home component. The backend works just fine but the

Why property does not exist on type in rxjs pipe function?

Why I losing the type in my pipe function? How to fix that? Property 'n' does not exist on type '{}' stackblitz import { of, map, Observable, Subject, pipe, t

'React' refers to a UMD global, but the current file is a module

I updated my project to create react app 4.0, and I'm slowing moving over my files to TypeScript. I know with this new version you don't have to repetitively im

'React' refers to a UMD global, but the current file is a module

I updated my project to create react app 4.0, and I'm slowing moving over my files to TypeScript. I know with this new version you don't have to repetitively im

Typescript compiler error for property that exists

I am using a React package called react-canvas-draw(https://github.com/embiem/react-canvas-draw) and the main class CanvasDraw has a function called getDataURL.

Mock OpenSearch Client in jest unit test

I'm trying to mock out the opensearch client for testing purposes and am running into an error. My app is using OpenSearch (@opensearch-project/opensearch) and

AngularFIre: LImit to 10 most recents registers

I have a query on firebase, but I want to show just the most 10 recents registers instead all of them my code is: videos: Observable<any[]>; construc

Usage of WebView in Typescript template of react native

I am trying to use WebView in the react native boilerplate (template: typescript). I am using WebView from react-native-webview library. /** * Sample React

Angular HttpClient "Http failure during parsing"

I try to send an POST request from Angular 4 to my Laravel backend. My LoginService has this method: login(email: string, password: string) { return this.

eslint complains about typescript's path aliasing

I've set up path aliasing in typescript's .tsconfig so my imports look cleaner. In my code when I try and import my interface like this import { ApiResponse }