Category "typescript"

How to use MUI to stack components on top of eachother?

I want a div that looks like this on Desktop: ------------------------------------------------------------------ | (icon) | (content)

bundle.js TypeError: Cannot read propertied of undefined (reading PriceIndexationDataControlStandard)

I am developing a React component via Microsoft PCF Framework and I have encountered a very strange error out of nowhere. I was changing only typescript, not ev

How can I assign a value to a variable of a callable type?

How can I assign a variable of a callable type (type with call signature)? interface CallableType<T> { (isSomething: boolean): T description: string

How to use maps and enumerations for property names in typescript?

The object pulsarAlert is returning with type [x: string] : string Ideally it should be able to detect that if channel = "SMS" then notificationType = "phone",

Wait for the reading of a csv file

I'm trying to read a csv file in Typescript with "csv-parse" library by creating an observable; the following code use fs.createReadStream to read the file; I w

Is there a way to debug Serverless Framework Typescript functions deployed to AWS Lambda, without using serverless-offline?

What is the best way to debug Typescript Serverless framework functions deployed to AWS Lambda without using serverless-offline package? My project is quite rel

How to build a TypeScript shell command that installs portably and globally?

I would like to build a command-line tool written in TypeScript that becomes available in the $PATH when installed. My requirements: I can run and test it from

React Native TypeScript WebSocket onerror Value of "this" must be of type Event

I'm trying to implement WebSocket support into my app by following React Native's own tutorial at https://reactnative.dev/docs/network#websocket-support. Here i

Typescript generic type constraint with conditional type, avoid circular type constraint

Suppose the following example class class X<T> { constructor(readonly t: Extract<'a' | 'b', T>) {} } The point is that the type function Extract

Angular 8 ERROR Error: Unable to find context associated with [object HTMLDivElement]

Just another day in the office, right? What once worked is no longer working. Yay! I am supporting an Angular 8 web application and attempting to kickstart loca

Angular ERROR TypeError: Cannot read properties of undefined (reading 'onDestroy')

I have problem. Angular is sometimes showing error ERROR TypeError: Cannot read properties of undefined (reading 'onDestroy') I am getting this error when I am

Failing tests -> Cannot read properties of undefined (reading 'rpc')

I was writing a test in TypeScript for Adding two numbers. I am receiving the following error: Adds two numbers: TypeError: Cannot read properties of undef

type 'never[]' is missing the following properties from type 'Observable<Customer[]>'

I want to fetch customers list from my back-end via get Http call. But i am unable to declare array of customers in my component. I have customer.interface.ts l

Files With A Tag in ObsidianMD

I'm trying to write a plugin that fetches the list of files containing a particular tag (like "#condition") in ObsidianMD for some downstream purposes. The buil

TypeError: Unknown file extension ".ts" in a Solana Anchor project

I got this error after updating Solana-cli to 1.9.4 and Anchor-cli to 0.20.1 and other local npm versions... Local npm package: @project-serum/anchor 0.18.2 Sol

How to use Google Identity Services JavaScript SDK with Vue / TypeScript?

I'm trying to authorize some Google APIs using the new Google Identity Services JavaScript SDK in my Vue / Quasar / TypeScript app. As per the docs I have loade

Create Infinite Scroll with react typescript

How do I create a infinite scroll that detects when we reach the bottom of the page but with typescript

Error loading workspace IDL for Solana Anchor Testing

For some reason, my mocha test is unable to find my IDL. I am getting the error below: name@Mabels-MacBook-Pro solana-anchor-reactjs-payment % anchor test BPF S

NestJS/TypeORM: Cannot set property metadata of #<Repository> which has only a getter

I try to run my nestjstutorial app, the below error is showing. My backend is connected to a PostgreSQL db. TypeError: Cannot set property metadata of # which

Error loading workspace IDL for Solana Anchor Testing

For some reason, my mocha test is unable to find my IDL. I am getting the error below: name@Mabels-MacBook-Pro solana-anchor-reactjs-payment % anchor test BPF S