Category "typescript"

"export 'Metric' was not found in '@superset-ui/core' (ERROR in ./node_modules/@superset-ui/chart-controls/esm/types.js) Angular/React

I'm new to superset-ui and currently looking to use it in our Angular application, although this issue occurs for React as well. I just wanted to try out "@supe

How to use map filesystem folder to debug original sources in Chromium Developer Tools

I have a website running at https://somewebsite.com/. It references a compiled javascript file: /js/site.js mapping file is also available on the server /js/sit

Unhandled Rejection (TypeError): this._oAuthHandler is undefined

I am trying to run Amplify Authentication within my TypeScript/React web application. I've had it working for weeks, but am now getting errors within the source

Typescript access and assign object property by dynamic key

I am trying to assign a value from an object of type TestInterface to another object of type TestInterface by accessing it with a dynamic key of type keyof Test

Warning: Prop `id` did not match. Server: "fc-dom-171" Client: "fc-dom-2" when using FullCalendar in Next.js

Context I'm using FullCalendar v5.11.0, NextJS v12.0.7, React v17.0.2 and Typescript v4.3.5. I wanted to create a simple calendar, based on FullCalendar documen

How to import a JSON5 file (as one can regular JSON) in Typescript?

I would like to import a JSON5 file into a Javascript object in the same way [one can import a JSON file](import config from '../config.json'). Shows this mess

Async child_process.exec with TypeScript

I'm trying to use a child_process.exec call with TypeScript, and error handling seems excessively hard to get right. Here's the gist of what I'm trying to do: i

Type argument at moment of use

I'm trying to build a generic tool for handling the response to React Query useQuery requests in my app, and build this out using TypeScript, so that the data i

JIT compilation failed for NgModule class

Here i got an Error like JIT Compilation failed and needed to flag some -aot and etc.. stuff

How do I get Intellisense for JavaScript in VS Code to work? (npm installed @types)

I am writing a little web project with p5.js. Basically it is just this right now: <!DOCTYPE html> <html lang="en"> <head> <script src="h

How to rotate material-ui icon

I'm trying to rotate material-ui icon using css property animation but not getting the desired result. Can somebody please help me identify what's going wrong h

Remove certain fields from the mongoose HydratedDocument

When we lean the documents, the id property is still included which is undefined and can cause unexpected errors. To simplify this for my team, I want to remove

How to flush promises since Jest 26+

Jest 26 shipped a new implementation of fake timers based on @sinonjs/fake-timers. Previously I used const flushPromises = () => new Promise(setImmediate); a

Differentiate between different Strings in TypeScript

I have a set of Types which are just strings, ie. type FooId = string type BarId = string const callFoo = (id: FooId) => {} const b: BarId = 'bar' callFoo

TypeScript function that works on all numerical array types

I am trying to write a function that works on all of the JavaScript array types, e.g. on number[], Float32Array etc. It should return the same type that it gets

Typescript inference for unions not picking up the correct type

Apologies for the vagueness, but I can't use the original files for security. I have four types: types.js export type BaseType = { requestType: string; oth

How to use createAsyncThunk with Typescript? How to set types for the `pending` and `rejected` payloads?

Right now I've got these actions that I use for an upload thunk's lifecycle. type UPLOAD_START = PayloadAction<void> type UPLOAD_SUCCESS = PayloadAction

manually copying types to @types/ directory during npm post-install

I would like to distribute a NPM package already containing type declarations which expand the global environment. (think of jest or mocha with a global test fu

Configuring tsconfig.json and eslint for a monorepo using Yarn workspaces

I'm using a Yarn workspace monorepo structure in a TypeScript React project: packages admin package.json user package.json package.json // Workspace

TypeScript/Eslint throwing a 'Promise returned' error on a Express Router async route

I have the following endpoint setup to reset a database after test runs: import { getConnection } from 'typeorm'; import express from 'express'; const router =