Category "typescript"

"Tsc" is disabled on my system when I used visual studio Code to run Type Script file, what shoud I do?

PS D:\WEB DESIGN INFO\Type Script\project 2> tsc is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fw

Get AST nodes typescript name from SpreadOperator RuleListener Identifier node argument

I would like to get the node.argument properties Typescript types name, and check if it's Foo. Let's say the Foo type is defined like this: type Foo = {}; This

typescript conditionaly set function parameter

Im building api in my next app, this api will send message using firebase fcm admin. This is my code import type { NextApiRequest, NextApiResponse } from "next"

Parsing error: Cannot read file '\tsconfig.json' eslint after following Firebase Cloud Functions initialization instructions

Problem Right after my TypeScript project initialization in VSCode using firebase tools for composing Firebase Cloud Functions following the official documentat

How to add TypeScript types to request body in Next.js API route?

Problem One of the primary reasons I like using TypeScript is to check that I am passing correctly typed params to given function calls. However, when using Nex

How to solve missing CORS headers when user defined headers provided?

Having troubles with providing Authorization header for requests: const response = await fetch(url, { method: 'GET', }); This works properly, and r

Why is the value not assigned to a variable inside forEach in Angular?

how can I have the return of the variable "this.qdDias" assigned a value to it. I don't know why when I use subscribe I can't get the value at the end of the me

Property 'exact' does not exist on type

I am trying to use react-router-dom inside my react app and also I am using typescript instead of javascript. The issue here is that I can't import Route inside

Changing background color using ngClass and boolean is not working correctly?

I am trying to check an object coming in a back-end response to see if error.isCritical is true or false and setting the ngClass accordingly, i've tried many di

typescript upgrade 1.8.10 to 2.9.2 and 4.6.4 build error

I have an angular application, using typescript 1.8.10 and working fine. I like to try and upgrade typescript from 1.8.10 to 2.9.2. Once I change this setting

Why don't I get a type error when combining these apparently-incompatible objects with the spread operator?

Here's my minimal reproduction: const br: Record<string, number> = {"b": 0}; const ar: {a: string} = {a: ""}; const brar: Record<string, string> = {

How do I strongly type a SvelteKit Request Handler?

I have a standalone sveltekit endpoint, and I'm not getting typescript typings for the endpoint. // src/routes/login.ts export async function post(request) {

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