Category "typescript"

How to copy the inferred type of an untyped function (TypeScript) in Visual Studio Code when its very long

(See Screenshot) I have this function with a really long untyped object returned, I want to copy the inferred type of that object because it's way too long to

Add Custom No Data To Display for ngx-datatable

How can i add a custom no data to display for ngx-datatable. I don't want the no data to display that comes with ngx-datatable. What i tried is below <div *n

Typescript Generic Map type not able to set KVP [duplicate]

I am trying to create a generic Map in typescript but no KVPs are getting set in the map. class type1 { public prop1: string; } var t1: t

Typescript/cypress-cucumber-preprocessor : Writing a Scenario Outline with dynamic examples

My question is very similar to this one: Behave: Writing a Scenario Outline with dynamic examples. The difference is that I do not use Python. I handle my Gherk

Focus a specific mat-option item when mat-select dialog is opened?

I want to focus to an option(scroll to an option) automatically when mat-select is opened. I thought that with a little bit of search this will be solved easily

Angular. Consuming service from module

I have a project with ConfigService which reads values from config.json Also I use AuthModule from Nebular which configures in module (core.module.ts in my case

How to use this.$refs in vue ts that error Vue | Element | Vue[] | Element[]

I need to use this.$refs.calendars.$refs.calendar.showPageRange() in js it work but in ts that error '$refs' does not exist on type 'Vue | Element | Vue[] | El

Rollup not emitting build in docker-compose

I'm building a react app and I'm trying to have it run though a docker-compose recipe. I have it working with docker container run -p 3000:3000 --name node --rm

Trying to make equal height elements in Vue 3 / TypeScript / Quasar but it doesn't always work

In my Vue 3 / TypeScript / Quasar app I am trying to make all elements with a class of .plan-item have a matching height. To do this I am using the below code:

Implementing fixtures with @nomiclabs/hardhat-waffle

In the official waffle documentation you may find the next way to implement fixtures: import {expect} from 'chai'; import {loadFixture, deployContract} from 'et

owl-carousel-o is showing item vertically

i'm using Angular and i want to show items in normal way (using owl-carousel-o) , but that's how they're shown in the Link that's the app.component.ts code

type undefined error on ng-apexchart for angular

Help me understand this error, please. I am simply trying to create a bar chart for my angular web app using ng-apexchart. I am following this article . I am no

DynamoDB - Query returning fewer results than Scan

Really hoping someone can help me here because I'm out of ideas. I've filled a database table with 4974 items, all of which are deliberately the exact same reco

TypeScript create type from generic argument

Say I create an instance of my class like: var x = new SomeClass<SomeModel>() Where the definitions are: interface SomeModel{ someString: string so

missing credentials in NestJs Passport

I've built an NestJS API with authentification. I'm using NestJS passport and I create a JSON web token when a user logs in. I've done numerous searches and I r

What is the correct typescript type for react children?

I'm trying to properly type the props for a component that maps children: type Props = { children: any } const MyComponent: FunctionComponent<Props>

`Property 'ethereum' does not exist on type 'Window & typeof globalThis'` error in React

I am getting the Property 'ethereum' does not exist on type 'Window & typeof globalThis' error in React. This is the line generating the issue: import { eth

CDK deploy results in "Bucket named 'x' exists, but not in account 067685711111. Wrong account?"

I am modifying a CDK pipeline that works. I am adding a lambda, and when this code modification is made, the pipeline fails with an error. import * as cdk from

Difference between Web Streams and Node.js Stream APIs

I'm building a file upload application to familiarize myself with the concept of streams. I'm trying to turn a file list or blobs into a stream then upload it t

Ant design onFinish function with typescript; Type '(values: FormData) => void' is not assignable to type '(values: unknown) => void'

I have interface FormData, which is supposed to be same type as values that onFinish function receives, but when I put const onFinish = (values: FormData) =>