Category "typescript"

How to rewrite type defination of third party library in vue project created by create-vue

I have a vue project using cesium library, following the update of cesium, some errors occur. My code: camera.setView({ destination, orientation: { heading,

React-Typescript: I don't find the problem why my getCurrentTime Function won't work

I am trying to write a function to display the difference time between current time and e.g. the creation time of a message. Herefore I wrote a function to get

VSCode `typeAcquisition` for browser imports

I want to have .d.ts typings for Lit which will be served from the esm.sh CDN. I want to use VSCode's built-in type acquisition system to get Intellisense for t

Generic Events Emitted from Component in Angular ~13

I'm trying to determine if I'm going down an undesirable path with how I'm approaching generic event management in an Angular application. The question I have i

Error pulling my own TypeScript package from NPM after using direct reference to GitHub branch for debugging

I have two packages that are both held on NPM, we can refer to them as A and B A uses B, so when I PR and merge with B it automatically updates NPM with those d

NPM Workspaces Typescript unable to find local modules

I have a NodeJS monorepo set up using NPM workspaces and Typescript. It works fine without Typescript, however introducing TS brings some dependency resolving e

How can i build an URL with searchaparams [duplicate]

for example : i want users to enter http://localhost:5000/ANY_FILE_NAME?height=200?width=200 in URL bar how can i build the URL to receive the

Typescript: Enforcing property type based on another property value which is a key of a generic

Given the following type: export type MyType = { a: boolean; b: number; } I want to create a type: export type Mapper<T> = { key: keyof T;

let and const keyword giving error in typescript after compilation. Where as var works fine

I am very new to typescript i am trying to work out watcing a tutorial. I am face this issue when i use const and let. After compilation ts file shows some erro

Copy value of a local variable to a global variable [duplicate]

I have this variable declared in global scope: export class InboxmanagementComponent implements OnInit { statmentID: number; // global vari

Typescript conditional return type based on props

In electron application I have a component that renders a button and sends a message to an arbitrary channel to the main process. The main process does some wor

Sequelize scope on create

I am quite new to sequelize and trying to use it with sequelize-typescript. I have a user model like this: @Scopes(() => ({ authenticated: { attr

yarn start FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Receiving this error with yarn start I tried many solutions with this error through stakeoverflow using this link FATAL ERROR: Ineffective mark-compacts near h

Typescript: how to define generic for object to constraint value type in different multiple key

My goal is to constraint data and follow details: if not specify key, data should has default key with specify type value. In this case , if not specify option.

Angular Error trying to diff '[object Object]'. Only arrays and iterables are allowed

I have issue with this "Error trying to diff '[object Object]'. Only arrays and iterables are allowed" when i want to get my products in html Here is my product

ERESOLVE Error when installing Angular Material

I'm currently creating a project with Angular 13, the Ionic CLI, and Angular Material. I have no problem adding @angular/material when I don't use Ionic, but us

How to change storybook's stories folder directory?

I use CRA(typescript) and add storybook using under cli code $ npx create-react-app <project name> -template typescript $ npx -p @storybook/cli sb init --

javascript plugin to display calendar

I am trying to find a package that i could install that would just display a view of a calendar as follows I dont need to add an event or anything i just solel

I want to display a list of products with details dynamically with jspdf-autotable in angular using only typescript

this is what i have as default for my jspdf autoTable(doc, { head: [['Product', 'Quantity', 'Discount', 'Prix']], body: [ ['product1'

Index of first child on a list is lost when sending it to the parent with React.CloneElement (React + Typescript)

I'm building a custom Dropdown component and I'm having trouble using children. The Dropdown component has 3 levels, and the children are the options which are