Category "typescript"

Cheerio `this` object in TypeScript make "TS2683: 'this' implicitly has type 'any' because it does not have a type annotation."

I'm using Cheerio in a Typescript project to scrape a HTML page. But I don't understand how to solve the issue : TS2683: 'this' implicitly has type 'any' becaus

Why "he" does not write React.FC on each function?

I learn typescript, and I dont understand why he write in the first Function React.FC and in other function he does not write "React.FC". Why? exp: ... const Lo

Property 'XXX' does not exist on type 'CombinedVueInstance<Vue, {}, {}, {}, Readonly<Record<never, any>>>'

I created a vue component with TypeScript, and I'm getting this error in data() and in methods(): Property 'xxx' does not exist on type 'CombinedVueInstance<

Rerendering component and useReducer initialization

EDIT: below the line is the initial problem where I asked if my whole architecture was fine. I later edited the topic (and title) to go straight to what was my

How can I set a session key from inside a GraphQL resolver in NestJS?

I'm discovering Nest.js and I want to setup a cookie based authentication system with GraphQL. I already installed express-session middleware, here is the conf

How to convert Observable<any> to array[]

I have following method in typescript, I need to bind to angular grid CountryService GetCountries() { return this.http.get(`http://services.groupkt.com/co

How to extend React Native View and other components props with styled-components

I'm using styled-components for styling in React Native with Typescript. I created a StyledComponent that styles a View component. However, when I try to extend

nest Command not found

I followed the documentation to create my first NestJS project. Installing the Nest CLI with the command npm i -g @nestjs/cli was successful. The output was:

i18next: Map an array of objects in TypeScript

I am rewriting a React project to TypeScript. Packages: Next.js, next-i18next, styled-components EDIT: The answer is outdated as of current next-i18next version

How to pass props to a styled component in emotion? Using TypeScript

I am using styled by emotion at: import styled from '@emotion/styled' I am trying to pass props to a styled component like the guide mentions: https://emoti

How to filter on aggregated data in Foundry Functions?

I would like to know how can I filter on grouped data in Foundry Functions. I already managed to group and aggregate on my data, see below: @Function() publ

How to handle window scroll event in Angular 4?

I can't seem to be able to capture the Window scroll event. On several sites I found code similar to this: @HostListener("window:scroll", []) onWindowScroll()

Angular ngStyle for multiple styles

I am working on a simple animation library where my user can modify my component using property binding, so far I have been doing the following to apply their c

Angular ngStyle for multiple styles

I am working on a simple animation library where my user can modify my component using property binding, so far I have been doing the following to apply their c

How to export Axios.create in Typescript

I have this working: export default axios.create({ baseURL: 'sample', headers: { 'Content-Type': 'application/json', }, transformRequest: [ (dat

ngx-charts-bar-horizontal data label formatting

I'm using ngx-charts more exactly bar-horizontal. What I'm trying to do is to format data label and add % at the end. I have tried to use [xAxisTickFormatting]

Uncaught TypeError: Cannot read properties of undefined (reading 'deep')

I am develop a google chrome extension using vue3 + typescript. I use v-link like this in the vue3 template like this: <li> <a v-link="{name:'about'

Uncaught TypeError: Cannot read properties of undefined (reading 'deep')

I am develop a google chrome extension using vue3 + typescript. I use v-link like this in the vue3 template like this: <li> <a v-link="{name:'about'

When Updating to HttpClient: Uncaught in Promise/Http Failure during parsing

In my angular app I'm updating from Http to HttpClient, which doesn't seem to work when working with Promises. It seems like you need to use a little 'work-arou

Angular: cdkVirtualFor not rendering new items

I'm building a vertically scrolling calendar. I'm getting the initial days to load, but when new days are added to the list, they aren't being rendered. <c