Category "typescript"

How to remove HTML tag (not a specific tag ) with content from a string in javascript

Is there any way to strip HMTL tag with content in HTML example : const regexForStripHTML = /(<([^>]+)>)/gi const text = "OCEP <sup>&reg;&l

Why is Swiper not working for me in angular?

I am trying to use Swiper but I cannot achieve it, I followed the steps in the documentation (https://swiperjs.com/get-started/), the problem is that all the im

How to control address bar change and back and forth actions in browser?

Have a nice day, everyone! I have a problem. I have an application written in React/TypeScript using Redux and react router . There is a table in which the user

What I am doing wrong when testing this method?

I am trying to test a method within a service that performs an http post. I have mock the service in my spec.ts and all seems correct for me, but the boolean va

Types of property 'theme' are incompatible in cucumber-html-reporter

Hi I'm new to cucumber framework and I was trying to generate a html report using cucumber-html-reporter. But the 'theme' property in options of cucumber-html-r

Property 'authorization' does not exist on type 'Request'

Consider this code: setContext(async (req, { headers }) => { const token = await getToken(config.resources.gatewayApi.scopes) const completeHeader

How should I design with React/Typescript: Server sends list of steps. Each step has a type and payload

I'm looking for some good ideas on software design for this problem: A server sends an array of Steps: type StepTypeEnum = 'SECURITY' | 'PERSONAL_DETAILS' | ...

Typescript says NextJS environment variables are undefined

I'm trying to make social login using 'react-google-login'. .env in root NEXT_PUBLIC_GOOGLE_CLIENT_ID=askfjaskf Ready.tsx import { GoogleLogin } from "react-go

Data from function is of type unknown - functions v9

I have a cloud function that takes an email and returns the user info, including the uid. The function is declared like this: const getUserByEmail = httpsCallab

Firebase functions dispatch tasks in order

Based of this article recently published by Google I am trying to dispatch firebase tasks in the order(first in first out) of the queue. But no matter what sett

Is there anyway working with schemas in Deno?

I am trying to store and work with a similar to following structure data using Deno and MongoDB. [ { id: "AAPL", stockData: [

What is the "right" way to nest components?

This seems like a very basic questions, but neither the documentation nor code examples I found were able to tell me. Given the following example: import { Flow

Angular dynamic forms project migration - 'input' has no initializer and not constructor, another error of Type T | undefined

Angular dynamic forms project migration - error of Type T | undefined I've been looking for an example project for building angular forms based on JSON datasets

Associate a valid label to this input field sonarqube

Sonarqube found a bug in this line of code: <div class="dropdown-language"> <label>{{'GENERALE.LINGUA' | translate }}</label>

error TS1259: Module '"./node_modules/@types/express/index"' can only be default-imported using the 'esModuleInterop' flag

I'm trying to import express into the project and in the middle of the development, it just stopped working, i've reseted configurations, etc. Can't make it wor

error TS1259: Module '"./node_modules/@types/express/index"' can only be default-imported using the 'esModuleInterop' flag

I'm trying to import express into the project and in the middle of the development, it just stopped working, i've reseted configurations, etc. Can't make it wor

jest issue with typescript react components

I'm currently having an issue with Jest and Typescript inside a Lerna mono repo. Inside the test file, I've imported the component import { Doctor } from '../sr

Reload component after back from redirection in angular 8

I make a external redirection with window.location.href to another page, but as external page take too much time to load, i show a spinner in my page (managed w

Node/Express I can't get the header set up in my route

I have a backend that uses Node and the Express framework and a frontend in React. The code is in Typescript. My backend uses the elastic search client to fetch

Generate the correct type instead of a union in GraphQL codegen

I am trying to migrate a setup which generates all the types exactly like what the server has into something which is based on just the document nodes that we'v