Category "typescript"

Uncaught Error: Cannot find module 'file:/home/agemiro/backend-gerenciador/uploads/imagemteste.png'

I'm using React JS and I'm having trouble accessing an image that comes from a state/variable. If I put the url inside the require in the html img it works but

React/TypeScript app fails to deploy to subdomain (404)

Hi I made react typescript app. Everything works perfect on localhost and domain, but when I upload same build folder to the subdomain i have 404 error. My .hta

Cloudflare KV namespace doesn't bind

Ran wrangler dev and it doesn't seem to bind Worker KV: ERROR in /src/handler.ts ./src/handler.ts 16:8-17 [tsl] ERROR in /src/handler.ts(16,9) TS2304: Can

Tuple argument type inference in Typescript

Is it possible to achieve the folowing in Typescript: I want the type of state.initial to be deduced as a tuple based on the input to the takeConfig. It would a

React-Native Warning: Overwriting font Family style attribute preprocessor

I'm getting the following warning: "Overwriting font Family style attribute preprocessor" coming out from StyleSheet.js when running the app on iOS simulator. I

react-native-webview Typescript error: 'WebView' cannot be used as a JSX component

I am trying to set up a simple React Native app using Expo with TypeScript that shows a WebView. My App.tsx file contains the following: import Constants from '

How do we load an angular component's styles into an iframe?

I'm working on a component that renders other components into an iframe. It renders successfully however I noticed the styles aren't being passed into it. I tr

TS2304: Cannot find name 'RTCErrorEvent'

I'm implementing a WebRTC app using Quasar, typescript and Vue. This piece of code does not yield any error in WebStorm (uses project's eslint config), I can go

Reload not working with mern stack on heroku

I have deployed my mern stack to heroku with this code: import express from "express"; import path from "path"; const app = express(); const port = process.env

Nested scrolling inside Swiper in react

I have a vertical swiper where in one of the slides I have a box with overflowing Y content, I want the user to be able to scroll vertically within the box. But

How to invoke a lambda function in aws-sdk v3

How can I invoke a lambda function using Javascript (TypeScript) aws-sdk v3? I use the following code which does not seems to work: // the payload (input) to th

@openapi is not working/recognized in typescript project

I have defined the swagger.ts as below: import swaggerJSDoc from "swagger-jsdoc"; import { version } from '../package.json'; const options: swaggerJSDoc.Option

VSC Default Directory for IntelliSense?

I use the code-runner extension in VSC to run untitled files on the fly, which is super helpful for quickly testing code snippets. Under the hood, the extension

How to create a test Unit method for a get request that fetches Data from Database(MongoDB)?

Get request method in tasks.js file const { Task } = require('../model/Tasks.js') const asyncWrapper =require('../middleware/async') const getTask = asyncWrapp

Object with Unpredictable Fields in TypeScript Interface

I am working on a web application in Angular and am making the following call to a service return this.http.get<SiteContent>(this.apiUrl + this.endpoint +

How to access Axios error response object in catch clause?

I recently upgraded to axios 0.23.0 and I am now receiving an error when trying to access the error response object in a catch clause. This is where I am gettin

Unable to get rid off this "The 2 extension(s) below, in workspace recommendations have issues" message in VS Code

I am on Mac M1 and the VS Code version installed is 1.67.0 Here is the screenshot: image How to get rid of it? I have tried to restart the VS Code multiple time

Generic type parameter extending type "any" is not of type "any" anymore

I was not able to find an answer to the question why function thisDoesNotWork causes an error. In contrast, function thisWorks transpiles the line anyArgs.whate

TypeScript: Code to sum values in one column based on the value in another column in Excel

I am new to TypeScript and my goal today, would be to sum up all the cell values in a column in an Excel file, based on the cell values in an another column. In

Node js with typescript; How to catch express errors

So if I am using node js with javascript, I used to catch errors by adding the following code in my app.js startup file: app.use((req, res, next) => { next