Category "typescript"

Angular not passing object to html page

I am having issues with learning angular, I didn't use to have these problems before, but now when I do these demos things work great until I switch from using

Angular - Async pipe in ngIf and text binding will not display first emitted value

I have very simple component template: <button (click)="emitNextValue()">Next Value</button> <p *ngIf="text$ | async"> {{ text$ | async }}

React-Typescript: Module '"react-router-dom"' has no exported member 'RouteComponentProps'

I have a project and with this project I have a login page and I want to use "RouteComponentProps", but I got this error: Module '"react-router-dom"' has no exp

How to write a TypeScript NPM package with JSX property suggestion/autocompletion for intellisense

I created a mini UI library and published it to NPM registry. My library is written with strongly typed styled-components (TypeScript) and can be imported in Re

How to test an Angular method which calls service and gets values?

I am trying to test this method, I have tried spying but the coverage shows not covered. Basically what this method does is, it checks if there is data availabl

optional chaining in Angular Template

Compiled with problems:X ERROR src/app/components/users/users.component.html:2:22 - error TS2532: Object is possibly 'undefined'. 2 <ul *ngIf="loaded &

Flexbox: Making an inline component expand the full width of the the parent container

I have inherited this project from someone else and I would not have set it up like this in the first place, but I have this component list-item-component: <

Auth0 Endpoint "api/auth/me" returns a 404 Error in Next.js App

I have gone through the following tutorial to get my Next.js App integrated with Auth0. I am able to log in and log out just fine but when trying to display use

Trying to use nominal typing for id in typeorm typescript

I was following this article TypeORM Best Practices using Typescript and NestJS at Libeo. I got to the point of using nominal typing in our entity ID @PrimaryG

typescript - detect if the div is overflow with text (not working if -webkit-scrollbar display is set to none)

Below mentioned code works fine if the scrollbar is visible. But it stops working once i use ::-webkit-scrollbar {display: none;} and -ms-overflow-style: none;

How to deploy TypeScript express server to Google App Engine?

This is my app.yaml `runtime: nodejs10 manual_scaling: instances: 1 resources: cpu: 4 memory_gb: 16 disk_size_gb: 10 handlers: - url: / static_fil

Access JSON like object properties

I have a return object like so: Can you tell me how to access its properties? I have tried many ways with Lodash too. But no luck yet. Failure attempts: t.conf

Solana / web3.js : getting web3.Signer from wallet

I want to send a token from one wallet to another using web3.js and spl-token. To send it I have to create an object named Token, one of the parameters of the c

Prisma: make boolean so only one can be true at the same time

Is it possible to make a boolean "unique" in Prisma? I want only one row to be 'true' at the same time. @Unique doesn't work because there can be multiple 'fals

Read xlsx file and json file with url signed on azure blob storage using nodejs

I intend to read the contents of an xslx and json files on an azure blob storage with the urls signed with a limited life-to-live. I did this as : const

AWS cdk error when trying to create App Runner

I'm trying to deploy my application with App Runner in AWS via CDK. It's based on https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-apprunner.Service

React MUI Autocomplete "options.filter" is not a function

I wish to create a autocomplete search bar with my own custom call to the backend, which searches through a list of tickers. <Autocomplete mu

How to use ${text} interpolation from a variable in Angular?

This question is about ts inline text interpolation in Angular (not template interpolation for the HTML files). I couldn't find relevant information about my qu

How to replace a specific position of a main grid (array of arrays)?

I'm coding a minesweeper and I got the UI and I can't modify it. I've made the grid for different sizes but now I need to push the mines into it, I created a fu

After installing TypeScript, why does "Peek Definition" in Visual Studio Code stop working?

I'm very new to TypeScript and am trying to figure why, when transitioning a project to TypeScript in Visual Studio Code, "Peek Definition" stops working. Befor