Category "typescript"

How to extends abstract class from template in TypeScript?

I have an architecture like that and I want to extends my TemplateService with a template but actually I have an error on it. Is there a way to extends an abstr

Spread values not being recognized in Create method

Deno has sessionStorage globally available, which is what I'm using as my in-memory database. I'm working on a method that creates a new museum in sessionStorag

Is there any way to add ui-element, ElMessageBox confirm button click event?

When I delete a data from the table, I want it to pop up a warning in the middle of the screen first.Delete function is ready,i just want to add confirm button

vsCode dependencies bug with nestJs

my vsCode bug to recognize dependencies when i program with nestJs, after setting up the project with: nest new projectname then after running for example: npm

Alternative to index signature

I have an array of object like this: [ { "bio": "Douglas Gerald Hurley is an American engineer, former Marine Corps pilot and former NASA astronaut. He la

Cdktf Optional block

How to make block optional if the value for the below block not provided? const BackupType=new TerraformVariable(this,"BackupType",{ description:"(Require

how to make an iterable type in type script that has a key value pair

I am using type script and I want to make a type that represents an object like this the keys generated are genrated dynamically how do I do that { dog:true,

createAsyncThunk redux toolkit with typescript rejecWithValue and Payload types error

I'm trynig to implement authentifiaction slice in redux toolkit with typescript, but typescript is complaining about rejectWithValue error type and the action p

Typescript: this.property inside a function gives error of type implicitly any. Can't call new Object();

I'm trying to integrate typescript into my learning path and understanding the differences with javascript. So far I was able to resolve all issues but I got st

MongoDB, get documents by a field, and mergeObject from another collections grouped count

Okay, the title is a bit too verbose and complicated but I have no idea how to put it any better. So here's what I have ModelA ModelB that has reference to Mode

Mutually exclusive types in a function signature

Is this possible to achieve with conditional types in TypeScript? type Type1 = { field: string, } type Type2 = { field: number, } // I would like to make

Angular. Form Model Validation

I'm trying to follow an example from Adam Freeman's book on Angular and now stuck with Using a Form Model for Validation. I have a similar issue as in Angular T

How can I make a typescript generic less specific?

When typescript captures generics it captures them very specifically which can lead to complications. How can I make this "LessSpecific" type dynamically return

Clicking in Canvas Angular

I am trying to capture the mouse click on a canvas that is resized (to draw an rectangle), my problem is that event.screenX /event.screenY always returns the sa

how to do on the Angular svg map to bubble point?

I added this map for the angular type script project, dose any one know to how to create bubble count region on the map like this image Stack blitz here here th

Typescript, merge object types?

Is it possible to merge the props of two generic object types? I have a function similar to this: function foo<A extends object, B extends object>(a: A,

CDK drag-drop is not working in Tablet device

I'm trying to use the Angular Material CDK Drag-Drop module from https://material.angular.io/cdk/drag-drop/overview It is working in desktop device but it is no

How to import a local grammar in tree-sitter node?

I am currently trying to import my own created grammar in a typescript node project in the following way: import Parser = require('tree-sitter'); import Languag

Is there any way to better visualise typescript errors?

I am using babel typescript preset to transpile my code. Some TS errors that I am getting emitted in the console could use some better formatting. I wonder if t

Construct signatures with JSDoc and TS-Pragma ts(2351)

I've a function that returns a constructor dynamically. When I try to instantiate the new object it warns me This expression is not constructable. Type 'myConst