Category "typescript"

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

How can I get type names and member TypeObjects from a ts.TypeObject?

I'm working with a TypeScript compiler to perform some code generation. This is my first time working with the compiler API directly. With some ugly narrowing b

Using Typescript with transpiled, unsupported/custom language files

The Problem I have JavaScript-like files with extension .gml I can convert the source to valid JavaScript via magic-string, and can go back the other way using

Dynamodb scan on array of objects Filter Expression

I want to scan dynamodb using filter on product_id showing in below json of table. Can anybody explain how to do scanning using filter of product_id. Wants to s

Next.js: Select element must have an accessible name: Element has no title attribute

Next.js and Typescript beginner here. I'm rebuilding an app using Next.js but ran into trouble splitting pages and components with the error Select element must

Preserve Type Restriction between Generic Variables

Assume that we have some class that has an important generic variable T and another class we have two fields, one wrapped, and one not: class Wrapper<V> {

Typescript compiles successfully but node cannot find module

Node error Error: Cannot find module 'hello' even though Typescript compiled successfully. Dir structure (note this is almost identical to tsconfig docs for bas

How to maintain a Websocket connection for my Angular(13.0.4) application across pages? I need to load the websocket url into service not at the start

So this is my web-socket.service.ts where I send the url information to the websocket in order to establish the connection: import { Injectable } from '@angular

Flow to Typescript

I now have flow type code like this export interface NodeBase { start: number; end: number; } export type Node = NodeBase & { [key: string]: any }; The

Unable to use Ckeditor in React Typescript

'CKEditor' is declared but its value is never read.ts(6133) Could not find a declaration file for module '@ckeditor/ckeditor5-react'. '/ProjectNameUnknown/node

Indexing object with a generic key

First time I've run into this issue so apologies if the title doesn't make sense, couldn't figure out a good way to word it. I'm working with an API that return

How to do a take query with Query Builder?

I have a one to many relation on database. one productKind have many Product ProductKind.ts @Entity() export class ProductKind extends BaseEntity { @PrimaryGe

Why any number value can be used in interface member declared with enum literal type? [duplicate]

I have the following typescript enum: enum Status { READY = 0, FAILED = 1 } and the following interface: interface ReadyItem { id

Vuejs types for component refs

I have following scenario: I have an component here: <div class="border shadow p-2"> <chart :config="barConfig" ref="linechart" /> </div>

How to use same enum in multiple files in Typescript without import

I've been struggling with this now longer than I should and surprisingly, the existing questions (and there are many) don't really help further. My goal is to d