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.

185,533 questions
0 votes
0 answers
7 views

Redux causing 40+ re-renders on single page: would like help identifying/fixing issue

I am working on the dashboard site for a music theory app company where users can manage their info, courses, assignments, media content etc. The site is built using React hooks and Redux Toolkit. The ...
0 votes
0 answers
10 views

What can prevent the token be setted when the Sign In function is right?

I use a SignIn function where I create this function using context API; after that, I call it on my sign-in page. This is my context: import { api } from "../services/api"; import { ...
0 votes
0 answers
10 views

Svelte: Get User Input Callback via Store Function

What I'm trying to do here may not be possible, but as a newcomer to Svelte, I hope it is. 😄 I have a delete button in a component that opens a globally available modal that serves as a confirmation ...
0 votes
1 answer
22 views

Property 'X' does not exist on type 'context | null'. ts(2339)

I can't figure this out. Why is TypeScript showing this error even though I have defined the type of the function in the type TasksContextType... Error: Property 'addTask' does not exist on type '...
-2 votes
1 answer
25 views

format number angular in component

hello, I have a number that I am trying to transform into my ts file but I can't get it to work. here is the number: 123456.059 expected result: 1.234 Thanks for your help. import { DecimalPipe } from ...
  • 37
0 votes
0 answers
15 views

Using TypeScript, why is mongoose causing a multitude of nonsensical type errors that break this build?

I am trying to get a server build running for a small API. However, I've been hitting a painful problem. Mongoose fails to compile under TypeScript, due to it's internal build of MongoDB. This problem ...
  • 749
0 votes
0 answers
6 views

Chrome Developer Tools error " Type is not a constructor

I'm attempting to load a custom view inside a dialog box as a popup view. Line that gets the error "UserPreferencesPopup() is not a constructor": dialogPopup.init(() => { ...
  • 1
0 votes
0 answers
23 views

Why doesn't typescript infer the final type inferred as string?

I have defined this type: type StoreDataValue = string | Record<PropertyKey, any>; And I have a parameter value that is of this type. First I create a temp variable and assign it to value. I ...
0 votes
1 answer
12 views

Add-in error Sorry. we can't load the add-in. Please make sure you have network and/or Internet connectivity. Click "Retry" once you're back online

I am developing an Excel JS TypeScript React addin with VS code. I deployed my add-in to Azure and it worked fine. Now I wanted to start a localhost for development purposes but all of a sudden I got ...
0 votes
0 answers
13 views

Solve Type 'string | false' is not assignable to type 'boolean | undefined' and Type 'string' is not assignable to type 'boolean | undefined'.ts(2322)

I'm wondering how to solve this ts error triggered by the enabled prop? The enabled prop has the following type: SubscriptionOptions<R = any>.enabled?: boolean | undefined Type 'string | false' ...
0 votes
1 answer
14 views

NodeJs csv-parse await inside on('data')

I have a code, which reades .csv line by line and saves each parsed row to the database const csv = require('csv-parse') const errors = [] csv.parse(content, {}) .on('data', async function (row: ...
0 votes
0 answers
19 views

How to compile typescript?

If I use tsc it doesn't work. If I don't have tsc but have typescript, it still doesn't work. What can I do?
0 votes
0 answers
8 views

laravel-mix error with typescript project

I have developed a react project which separately works fine. Now, I want to use it as a Laravel project ui. When I use Laravel-mix for mixing react files, i get an error as below: Module build failed ...
0 votes
0 answers
41 views

Array is not iterable at build time

I'm building an app with Next using Typescript. I'm passing an array of objects as a prop. const arr = [{},{},{}] ... <MyComponent arr={arr}/ > I've provided 'prop-type' and 'InferProps' to ...
0 votes
1 answer
18 views

Can't get object values in the form

I can't get object values in the form to edit/update. getting this error: ERROR TypeError: Cannot read properties of undefined (reading 'productName') at UpdateProductComponent.ngOnInit (update-...

15 30 50 per page
1
2 3 4 5
…
12369
Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest