Category "typescript"

How to properly write types for an array of generic React components and their properties?

I'm trying to properly type the following scenario: I have a manager/service that contains a collection of items, each item itself consisting of a React compone

Is there any way to modify the MatDialog overlay order?

I want to implement basic dialog handling in my application, with 2 functions: To close all open dialogs: Easy with MatDialog.closeAll(); Enable the user to swi

TypeScript error TS2403: Subsequent variable declarations must have the same type

I seem to be running into some compile errors on my TypeScript project. The full error is: node_modules/@types/mocha/index.d.ts:2680:13 - error TS2403: Subsequ

NestJs: Unable to read env variables in module files but able in service files?

I have an .env file at the root of my NestJs project with some env variables in it. The strange thing is that I am able to read the variables in service files

NestJs: Unable to read env variables in module files but able in service files?

I have an .env file at the root of my NestJs project with some env variables in it. The strange thing is that I am able to read the variables in service files

How to customize csv data in amcharts3 export function in Angular

I have 2 columns 1 with id and the other with a count. Now I want to add a column to display the percentage in the CSV and a heading for the file. data: [ { 0:

How to type vue instance out of `defineComponent()` in vue 3?

As you know, as of Vue 3, component could be written in TypeScript: /// modal.vue <template> <div class="modal"></div> </template> &

How to resolve rollup build error when using emotion: 'default' is not exported by @emotion\memoize\dist\memoize.cjs.js

I'm trying to build a standardized react button component for our enterprise library. I want to be able to use @emotion/styled to generate the styled react comp

Angular interceptor exclude specific urls

I am writing interceptors such that I don't have to handle the headers in every service calling my web api. The problem with this is that 99% of my calls requir

How to react to route changes on Vue 3, "script setup" composition API?

This is an example of routes I have in my application: { path: "/something", name: "SomeRoute", component: SomeComponent, meta: {showExtra: true}, }, {

Extend index signature of interface

I'm trying to extend an interface which has an index signature. However, when adding new properties that have different type, the old index signature leads to a

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