Category "typescript"

I get a problem with use dotenv with react in typescript or .tsx files

I tried to use import * as dotenv from 'dotenv' and import { config } from 'dotenv' and restart the server many tames else I tried that dotenv.config({ path: __

typescript + eslint + babel issue in expo project: lots of Parsing errors

eslint is giving me a really hard time > Parsing error: The keyword 'const' is reserved. :eslint > Parsing error: The keyword 'import' is reserved. :esli

Unable to create @manyToMany realtion ship in mikro-orm

I have issue with my @manyToMany relationship in mikro-orm framework. I created this entity: enum NotificationCategory { REPORT = "report", PARKING = "p

Typescript check that all env variables are set based on interface (union type to tuple type issue)

I want env.d.ts file to represent required application env variables and make sure that any change or addition to it will result in typescript error as well as

Assign ELB Account to S3 Bucket Policy

I used the AWS console from the load balancer edit attributes screen and used it to create a bucket to use for access logging. I'm using this policy to form CDK

How can I programmatically disable or remove arrow key navigation on a PrimeNG Table using TypeScript or Angular

I would like to programmatically disable left and right arrow key navigation in a PrimeNG Table using cell editing, without having to modify the Table component

How to set a variable for a key in typescript

Im trying to set bob via variable key; interface Person { name:string, age:number } const bob:Person = { name:'bob', age:12 } function setSome<T exte

How do I upload multiple files in array in Angulars reactive forms, from an API and send the data as a number to the array

***ERROR IMAGE: *** https://ibb.co/JKd0hV3 Who can help me solve this problem, I get a 490error whenever I run this code. Am I missing something or need to refa

How to capture Typescript conditional property type

I have the following Typescript type: type Config = { key: string, type: `input` | `switch` | `radios` | `select` | `checklist` | `image`, options: string

Merge multiple POST requests based on the same value of each array. (Angular)

These are the two outputs "statusCode": 200, "data": [ { "color": { "id": "1111", "name": null,

How to access FlowNode in typescript ast api?

I try to resolve foo and bar from nodes variable. After I checked at ts-ast-viewer you can see in the picture that typescript can know about foo and bar from no

Typing Object.fromEntries(new FormData(form))

TypeScript newbie here, having problems with Object.fromEntries. I'm trying to pares form and cast its values to something else. For example, given homogeneous

Typescript generics with functions Parameters

I'm trying to open a typescript method using generics. There is an object with methods (the comment indicated different types of function parameters) const emai

Shadowdom access form selenium javascript/typescript

I'm trying to get access to some shadow dom elements using selenium in Javascript/Typescript, but can't quite seem to get it to work as expected. I haven't bee

Tuple inference via literal typing (i.e brute force typing)

This seems so obvious and simple, but I can't get it to work. Would love to get everybody's perspective to see if you can find what am I missing. Playground con

Ignore Typescript errors in submodule

I have created a Typescript React project using create-react-app. I have also added a library via submodule. However, Typescript keeps reporting error on the su

Using redux toolkit in NextJS without next-redux-wrapper

I'm new to NextJS and I'm trying to figure out on how to implement RTK, I stumbled on this github repo example from Jack Harrington and basically his slices has

Destructure a function parameter in Typescript

I'm trying to give a type to the members of below function. args is an object with a data property of type UserCreateInput So, from this: createUser(parent: a

Typescript Function Arguement with Child/Inherited class?

I am trying to write a function that sets some properties on its arguments (not return a new object), the argument is of a class that extends from the same base

How to create a generic buffer in TypeScript?

I have the following class: export class BufferData { arr: Float32Array; index: number; constructor() { this.arr = new Float32Array(8); this.inde