Category "typescript"

This React Private Route isn't catching Firebase Auth in time?

I'm working with React to build a admin panel for a website, and using Firebase as the authentication system (and data storage, etc). I've gone through a few Pr

error TS2339: Property 'clipboard' does not exist on type 'Navigator'

I get this error in my project, that I am updating - they want to copy data to the clipboard. Custom data, that I can easily put together error TS2339: Property

Integrate bootstrapVue using TypeScript and Vue3

use(BootstrapVue as any) can correct the following error but still in browser it doesn't work. main.ts : import { createApp }from 'vue'; import App from './App.

Typescript error TS2583 Cannot find name 'Set'

I have just started learning Typescript today and when I run tsc app.ts I get 11 errors but I thought I would start with the first. Tried updating tsconfig.json

Swiper 8 and jest

Swiper 8 and Jest (support ESM) Must use import to load ES Module enter image description here enter image description here How we can solve if I need to keep s

react The swipe animation will be performed twice

When you press the Circle button, the Box moves to the right and disappears from the screen. Additional information (FW/tool version, etc.) react scss Typescrip

Is there a way in typescript to type a string as JSON string and specify the parsed objects type?

{ key1: "{\"key2\": \"123\", \"key3\": \"ABC\"}" } In the above object the value of key1 is a JSON string that needs to be parsed. Is there a way in typescri

How to execute subscribe firstly before another subscribe angular 8?

I work on angular 8 i have two subscribe i need to execute first subscribe and after finish execute second subscribe . but i don't know how to execute subscribe

printer.printFile prints empty string

I am using the compiler API to create Typescript code. After assigning const printer = createPrinter(), I can use printer.printNode and printer.printList to pri

How to execute subscribe firstly before another subscribe angular 8?

I work on angular 8 i have two subscribe i need to execute first subscribe and after finish execute second subscribe . but i don't know how to execute subscribe

How can I find updated Ag Grid React localization file?

I have currently using a AG_GRID_LOCALE_EN locale file but it is outdated, there are missing keywords. Need the last version of it for the localization. Searche

ts-node with tsconfig-paths won't work when using esm

Edit: I found the solution in this issue I couldn't figure out why ts-node isn't resolving the alias when esm is enabled I made a tiny project trying to isolate

Type 'MyType' is not assignable to type 'WritableDraft<MyType>'

I use @reduxjs/toolkit and my state contains: allSlides: ISlide[]; When I try to change anything in allSlides like ex. setAllSlides(state, action: PayloadAction

i get the Data just in subscribe bracket [closed]

This is My Code: getTransaction(transactionRef: string){ this.partnerportalService .getTransaction(transactionRef) .subscr

Get value from object of unknown content by key in typescript

I'm writing function that'll return single value from object by key or return empty object if key does not exist. Code: //example data: const obj = { data:

Shorthand for union of all properties of type

Context: I'm making function that accepting const asserted argument: function langs<T extends Partial<Record<Lang, LangDict>>>(dict: T & R

How to narrow down the union type of a class generic?

This class holds either a single Item or an array of items Item[], determined by a setting at runtime (this.config.isMultiple). How can I narrow down the class'

TypeScript failes to infer return type of constrained generic function in some cases, why is this happening?

I have this code, which works just fine in a simple case, meaning the "permissionList" const is type inferred, VSCode can suggest me the properties, such as "pe

How to set global property for react using esbuild

According to the docs using define is the suggested way of setting the env properties for a build. When I run my app with I get a process is not defined error.

Why can't my app run on the intended port in Heroku?

I can't figure out what is the problem with heroku, I've spent 2 days trying to figure out what this error means to no avail. 2021-07-18T04:27:08.741998+00:00