Category "typescript"

React-Hook-Form - defaultValues not updated are not registered

I have a form who get updated directly when an user change an input. For that, I use the onBlur method. When I change an input from the defaultValue, it save it

Is there a more functional way to merge and foreach/sort two arrays in TypeScript, React?

I'm learning React and TypeScript. For sake of practise, I've tried to create a calculator design by merging two arrays to map a single array onto the grid (dis

How to fix: No changes in database schema were found - cannot generate a migration?

I searched a lot and there are several questions like this however most of them do not have any answer or are not relevant to me. I'm using TypeORM(v0.2.45) wit

how to use Arrow function in a inline event handler [duplicate]

I have this component (vue3+ts) <q-input type="number" filled model-value="Model.Code" @update:model-value="val=>console.log(val)" />

Some Prisma Model @@map not generating

I have a few models in my schema.prisma file that are not generating with their @@map for use in the client. model ContentFilter { id Int

arcgis Failed to load layer: Cannot read properties of undefined (reading 'bind')

I'm trying to query a public ArcGIS server using a some a node script in Typescript but I'm getting the error: [esri.layers.FeatureLayer] #load() Failed to load

Why are Next.js' req.query object's values of type string | string[]?

Next.js' API Routes receive a req object - it's an extension of http.IncomingMessage with additional middlewares such as req.query. The typing of req.query, fou

same file name in typescript files and javascript files

Let's say in the src folder, we have two files, one is typescript file someFeatures.ts, the other is js file someFeatures.js,so their main file name is the sam

Using makeStyles in material ui with typescript

I'm trying to convert JavaScript template to Typescript. So I have this accordionStyle.ts like below import { primaryColor, grayColor } from "../../material

vue + count items date within 30days and display the total on the page

How do i count the items by checking the date within 30 days from the current date? Here is my sample code: <table width="100%" border="1"> &l

How to change localStorage object-variable to false after a certain amount of time

I have an issue with a project where i need to change an object variable to false and save it to local storage. let animalHtml = // Checking if animal is fed or

Deep find object in tree, then return object and the path to it through the tree

I've written a recursive function to find a given object and the path within that tree, but when I change the target id (over here : if(tree.targetModuleId ===

Structured Logs in Google Cloud Run not being parsed (using Winston for logging)

I'm attempting to format my logs in such a way that Google Cloud will correctly extract the log level. This is running on Cloud Run, with typescript. Cloud Run

Need help calling a function from parent component in angular

Need to call function from app component to ALL child components, I cannot make it work with output, nor emitter, nor viewchild. Parent component import { Compo

Specifying the type for Threejs Object3D.userData in TypeScript

In Three.js there is a field on Object3D class called userData, which in the type declaration file node_modules/three/src/core/Object3D.d.ts is defined as /**

how to strongly type body of NextApiRequest in Nextjs [duplicate]

wondering how to define the type of body of an API POST Nextjs route in order to benefit from typesafety ? In the NextApiRequest, body is defi

Typescript interface for a nested array of objects

I'm new to Typescript and I have to build an interface for the following props type: const myProps = [ { name: 'name1', on: true, children: [

infinite loop on loading workDays ejs-schedule

I am trying to load working days through a function, I need to load days by calling a function so that I can validate which days it works. For all other parame

How to use React Keycloak?

Did according to examples, but I get an error: http://localhost:3000/#error=login_required&state=19004288-e312-4782-ac23-9dc038cd7bb0 Here is my code: keyc

Uncaught TypeError: Cannot read properties of undefined (reading 'isBatchingLegacy')

I am trying to test a react typescript project using jest but it's giving a confusing error: Error image Here is my package.json: "dependencies": { "@testin