Category "typescript"

React Navigation for React Native not navigating - anything missing?

This is my first try on using react navigation, and I did not get it to work out of the first time. I have create another screen called 'First', and declared it

Webpack-dev-server "Cannot GET /"

i'm trying to get my webpack-dev-server to run but i face always the error "Cannot Get /" at the browser. I know that there are serveral questions with the same

NestJS Middleware Not Executed

The NestJS class or functional middleware doesn't run when connected from a Module. It is also not working for a single path, controller or for every path. Conn

Json Schema which has at least one of any properties (or more) with ajv

I am trying to build a simple Json schema (at least that's what I thought) which contains two properties foo and bar. It should validate when: foo is in the jso

How to fix circular dependencies of slices with the RootState?

I recently started using redux-toolkit and started writing my reducers using the createSlice following their docs. One reducer, let's call it reducerA, imports

Execution flow in react native after navigation.navigate

Need suggestion and advice, I am using the below 2 lines of code in react native expo component, this.props.navigation.navigate("App"); patchUser(this.state.da

Angular - Cannot read properties of undefined (reading 'forEach') by trying to manipulate variable after an HTTP call

I'm trying to manipulate a variable after an HTTP call. I want to use functions such as .push() or .forEach(), but it doesn't allow me because data isn't assign

Make id in FormattedMessage from react-intl inherit from a custom TypeScript interface to enable VS IntelliSense and type checking

Given that react-localization does not have date and number format and is heavily dependent on one developer we decided to switch to react-intl because it seems

Typescript - Custom type assignment by value [duplicate]

In one of my procedures I need to periodically reset a custom type, but I noticed that in TypeScript (and I think in JavaScript too maybe), wh

Can I short-circuit type evaluation?

I'm trying to create a composable configuration framework wherein each node in the dependency graph can access all of its upstream nodes. Although I've managed

Angular typescript update class if element is in array

I am doing an APP in Angular 12. In my component.ts I have an string array[] like AccessRoles["AA","BB"] And on the other side I have a class like this export c

MaterialUI - 'StylesProvider' cannot be used as a JSX component

I have an app written in React with TypeScript and lately after refreshing node modules and the lockfile I am getting this error when trying to run the app: Typ

Ignoring axios error for invalid certificates when creating a vscode extension

I am currently working on a Visual Studio Code extension that makes HTTPS GET requests and I am trying to ignore invalid certificates e.g. expired certificates.

NestJS setup TypeOrm connection with .env and @nestjs/config

I'm trying to find the most legal way to set up NestJS database using .env file. That is I want to use @nestjs/config package for importing .env variables and u

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