Category "typescript"

Filtering an observable array into another observable array (of another type) by an observable property of the items

As the title probably doesn't explain to well what I am doing, I'll give a small example: A REST api returns a list of objects. For each of them, a checkbox sh

React, Next.js and Type Script Unhandled Runtime Error TypeError: Cannot read properties of undefined (reading 'value')

I am developing a multi-page form using antd package to add some style In the main page of the form, I wrote the following code (I imported everything that I ne

Function DocumentReference.set() called with invalid data. Unsupported field value: a custom Budget object

Below code works fine until today. But I don't know now it is not working and gives below error.Could you tell me why? Error: Function DocumentReference.set

Using Google One Tap in Angular

I'd like to use Google One Tap in my Angular 11 app. Following the documentation I added <script async defer src="https://accounts.google.com/gsi/client">

How do you type hint Vue props with typescript interfaces?

Really hitting my head against a wall on this one. I remember working in Angular that TS interfaces can be used to type hint parameters. I'd like to do the sa

Formidable doesn't work outside localhost

I've made a basic file uploader website using formidable. The file uploader works on my localhost, however when other devices use my website to upload files it

How do I extend the typings of Express.Application to give typings for app.locals

In our application, we're adding quite a few config objects to app.locals that get used in our middleware. const app = Express(); app.locals = { someConfig:

VSCode how do I stay on source control tab?

I've started having an odd issue. Previous behavior (what I want): When I go to the source control tab and click a file then the comparison window opens to the

What is the 'default' part for an imported Node.js module, generated from Typescript?

In a typescript file I have a import of the filesystem and path Node modules. I use them in a pretty standard way, like: const workDir = path.join(outputDir, "

Can you compile a TS file with webpack separately from Vue application?

So I have a Vue 3 + Typescript app. npm run build of course takes the app and compiles it into the dist folder so it can be deployed. I have a web worker typesc

How to detect change from one component into other

Angular 4. Github source I have a menu which is filled by a web service. The web service is in taskService, but is not necessary now. ngOnInit() { this.

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