Category "typescript"

Chrome extension Tailwind CSS interferes with websites I visit

I am building a chrome extension. I am using React, Typescript, TailwindCSS, custom Webpack config. I've overwritten default action in manifest.json so clicking

React HOC FC with correct Typescript type?

Another just starting out in typescript posts. I have read numerous posts on typescript HOC's and Functional Components replacing the class based components. bu

How to use MemoryRouter in order to test useParams call

I have a hypothetic React component named Component.ts with a code structure similar to that: import React, { FC } from 'react'; import { useParams } from 'rea

NullInjectorError: No provider for InjectionToken angularfire2.app.options

I'm trying to insert the form data in cloud Firestore database. Below is my x.component.ts file in which I'm getting error at constructor where I'm writing priv

Getting no overload matches this call running mongoose with typescript and express

I am getting the below error for useNewUrlParser, useUnifiedTopology, useCreateIndex: No overload matches this call. Overload 1 of 3, '(uri: string, callback:

Nestjs create Generic CRUD service

I want to create a base service using a generic class which I wrote below: import { BaseEntity } from './base.entity'; import { Repository } from 'typeorm'; e

typescript arguments are not aligned (align)tslint(1)

I have the code setTimeout(() => { const elementsInput: any = document.querySelectorAll('.Modal__headerEmailInput') elementsInput[0].focus() el

Using eslint with typescript - Unable to resolve path to module

I have this import in my file app.spec.ts: import app from './app'; Which causes this Typescript error 2:17 error Unable to resolve path to module './app'

Error Uncaught TypeError: e.target.className.indexOf is not a function at HTMLDocument.mouseup (translator.js:433) in angular

I have one modal bootstrap, when i click in one svg to edit my data i receive: Uncaught TypeError: e.target.className.indexOf is not a function at HTMLDoc

How to detect browser close event or tab close event in angular 6+?

I have written @HostListener in my AppComponent Class to detect browser close or tab close. I have written this code but it is not working. Kindly help me unde

Why Intro js disableInteraction doesn't work

I have created a tour and I want the items highlighted to be clickable so I added attribute disable interaction to the tour but the items are still not clickabl

Dynamically Change colour/css styling of Disabled text boxes based on boolean value

<label [invalid]="false" invalidText="" placeholder="Placeholder text"> Middle names (optional) <input ibmText [attr.disabled]="isApplicationLo

TypeScript: Why is that my filter method cannot narrow the type and eliminate the undefined and false from the array

I have this type from the d.ts file of an API type EventConfigurations = { Event1: { Enabled?: boolean; }; Event2: { Enabled?: boolean; }; E

How to share content via deep link in a Teams app?

I am developing a small Teams app also using the Teams-SDK. I am currently looking for a way to share contents from within my app in Teams (either via a chat or

Argument of type 'HTMLElement | null' is not assignable to parameter of type 'Element'. Type 'null' is not assignable to type 'Element'.ts(2345)

I have index.html <body> <div id="portal"></div> <div id="root"></div> </body> and want to use the component below

How to define types for Cypress task return type?

My objective is to define types for my cypress task, written in typescript. I currently have this when I consume the custom task: cy.task('customTask').then(v =

Why is Graphql data object only available outside the call function

I am new to graphql and react so I can't figure out why the loaded data return object is only available outside the mutation post which produced the data. Could

How to hide background contents of window.open while printing in Angular

I have running Angular 12 application and I am integrating the behavior to print report. I am able to achieve the print on button click which opens a new window

Hiding a mat data table column in angular 4

<ng-container matColumnDef="jan"> <mat-header-cell [hidden]="true" *matHeaderCellDef style="font-size: 65%" class="white-text" fxHide [fxShow.gt-md]=

How to strongly type jest mocks

I would like to strongly type my jest mocks. To a certain extent, I can make it work but when a class has private properties I'm stuck. An additional question,