Questions tagged [typescript]

TypeScript is a typed superset of JavaScript that transpiles to plain JavaScript. It adds optional types, classes, interfaces, and modules to JavaScript. This tag is for questions specific to TypeScript. It is not used for general JavaScript questions.

0
votes
0answers
3 views

How can I get live-reload on a local npm package in a monorepo?

I'm setting up a monorepo workspace for a Vue 3 (vite + ts), cloud functions, & shared-lib (shared functions and ts interfaces etc.). I can get the import of my local shared-lib folder to work. I ...
0
votes
0answers
5 views

How to apply useRef() in React TS?

Goal: Get value from the textbox when you click on the button Problem: The value don't display in the console. "Uncaught Error: Function components cannot have string refs. We recommend using ...
0
votes
0answers
6 views

store async function into array and build some sort of queue to execute each in a row [duplicate]

I am trying to build some sort of queue to avoid an api rate limit. What I am doing is this (pseudo code) which for some reason is not working. They all get executed at the same time still. What am I ...
0
votes
1answer
10 views

How to set up Vue 3 Composition API (Typescript) todo list app with reactive method

I am attempting to build a basic todo list app using Vue 3 Composition API with typescript. I previously configured the setup function for my component to use a ref method to handle reactivity of user ...
0
votes
0answers
3 views

Save generated data or single data, every seconds from NestJS to MongoDB

I am struggling a situation which is; I have to post(save) data to MongoDB from NestJS method for every 1 - 5 or 10 (The time interval doesn't matter as long as it's seconds.) seconds using Postman. ...
0
votes
0answers
12 views

Reset form on cancel/closse Vue

I have a form for creating a task but when I click cancel and open up the form again, the data is still there and I would like it to be cleared if I click outside the dialog or click cancel. I have ...
0
votes
0answers
7 views

Why I get Vue 3 + Typescript + Vuelidate get

can anybody help with the problem with Vue 3 and Vuelidate. I configured the vuelidate for by guide the https://vuelidate-next.netlify.app/guide.html. <script lang="ts"> import { ...
0
votes
0answers
9 views

How to implement a plugin/module system for a javascript SPA

I'am trying to archive a plugin like system for my Javascript/Typescript SPA, but I'am not sure how to approach this in terms of code bundling/splitting. Current setup: The frontend and backend is ...
0
votes
0answers
16 views

NextJS - `dev` not working but `build` && `start` do

Created a Next (version: 12.0.7) with Typescript and Storybook. I can build and start the server, however, dev fails once I make a request and spits out this message: Browser: Uncaught ReferenceError: ...
1
vote
2answers
16 views

Autocomplete using Antd in Reactjs

I am making an autocomplete options in react app and generated the autocomplete field with list of options. Working Example: List of options: const options = [ { label: "hello", value: &...
0
votes
0answers
10 views

Reducer type is not assignable

const enterAnswer = (answer:string) => { store.dispatch({ type: "addAnswer" }) } enum ActionTypes { A = "addAnswer", B = "resetAnswers" } interface addAnswer { type: ...
0
votes
0answers
10 views

Webpack imported module is an empty object

I want to use the "virtual-select-plugin" library in my webpack/typescript project. It has no type definitions. The library was installed via npm. In the browser I get the error: TypeError: ...
-2
votes
0answers
11 views

fabric typescript to golang

Here is the link:https://hyperledger-fabric.readthedocs.io/en/release-2.4/write_first_app.html The example which you show ,it‘s suit for typescript but not golang,and fabric-samples/asset-transfer-...
0
votes
2answers
13 views

Automatically parse some fields to string on mongoose?

I have an object that looks like this { name: 'abc', value: BigNumber('125'), other: { otherValue: BigNumber('252'), } } Its mongoose schema is: { name: { type: String, required: true },...
-1
votes
0answers
18 views

Typescript: Type 'Timer' is not assignable to type 'null'

I use this code: const clearTimer = (e: any) => { setTimer(<div></div>); if (Ref.current) clearInterval(Ref.current); startTimer(e); const id = setInterval(() => { ...

15 30 50 per page
1
2 3 4 5
11377