Category "typescript"

Angular 11 - To add files zip using JSZip

I am trying to add several txt files to a zip file and download it locally. For this, I am using the libraries: JSZip and FileSaver. This is the "typescript" co

Why does the useQuery hook in react-query force me to check if the returned data is not undefined

I'm experimenting with react-query as a replacement for my custom logic when loading data from a server in a react application. What I cannot seem to understand

How do I manipulate data based on another data in Redux Toolkit (React)?

const { data, isLoading } = useGetDataQuery({ skip: !dependency } ); const { data2, isLoading2 } = useGetData2Query({ skip: !data } ); const { data3, isLoadin

Dynamic accordion for lists in angular using bootstrap accordion

I have written the code for dynamic accordions it showing the design correctly but functionalies(hide/show) are not working. Below i have shared the code please

Mobx React Return Store without Component

I am trying to build a function where I can switch languages in my store and use different json files based on return value from a hook. Here is my store: impor

How transfer multi parametrs to vuex mutation with respect TypeScript

I'm trying to lunch a mutation but my param is udefine how should I properly transfer my varrables to make this function works? Pleace help Component props:

Conflict with React types when building with tsc

I am trying to build an NPM package with TypeScript, not a normal React project. When I run tsc to build the project, it returns many type errors: It seems to b

How do I make the input send a whole word instead of each letter I type after a delay?

search(value) { if(value.length > 3) { setTimeout(() => { searchApiCall(); }, 2000); } } <input type="text" class=

Uncaught TypeError: Found non-callable @@iterator (react/typescript|esbuild-loader)

So i am trying to replace ts-loader with esbuild-loader in webpack, however it seems like as soon as I make the change, the page stops working. { test: /\.t

ERROR TypeError: this.authService.injectAuthHeaders is not a function

I am getting following error Issue is i have a abstract class which is not getting injected, i dont know how to inject abstract class. looks like the issue is

How to prevent memory leak of subscriptions creation when perform an event?

I need to make sure there is a single subscription (e.g. within the constructor) and chain the flow of events from another component to an observable property o

How to auto-populate an abstract property?

I have an existing abstract class, say Vehicle and I want to create an intermediate class to reduce repetition of abstract properties in my instantiatable class

Cypress: Not able to stub with a basic example. What might i be missing?

For some reason, I am not able to stub this here. I have reduced my code to almost exactly this here. This should work according to the docs, but I'm wondering

optional parameters when defining routes

I am working on deno equivalent of my node (express) server application for study purposes and I can't find a way to apply optional chunks when defining routes.

React typescript - Gettting type error when trying to assign React's key prop

I have simple code as follows: /types.ts export type TodoType = { id: String task: String completed: Boolean } /components/Todo.tsx import { TodoType }

Jest not returning exit codes

I've trying to run tests for my Express + TS application through GitHub Actions But even if my test fails, it seems Jest doesn't return a non-zero exit code so

Angular: access variable which is declared inside subscribe function

I'm trying to access a variable inside a subscribe function but it returns to me undefined, please any suggestions: export class InboxmanagementComponent implem

Make the high/low values in step wise from a range in google sheet [closed]

Need google app script to make stepwise to an array of numbers taken from a range cell values. Example suppose the taken cell values from A

How to solve 'T' could be instantiated with an arbitrary type which could be unrelated to 'T | S' (ts2345)

I am trying to implement generic mutation function using ReactQuery, the code works fine but I am getting a type error which I could not solve. Can someone help

How do you implement a simple progress bar in Angular 8?

I would like to implement a progress bar which increases progressively as a variable increases. I've tried it 3 ways, none of them work as I wrote it. Using CSS