Category "typescript"

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

Angular: Component is not resolved when using Speedy Web Compiler (SWC) for TestBed tests

The tests in my Nx Angular 10 repo have been running very slow so I decided to switch from using jest-ts to @swc/jest. jest.presets.ts const nxPreset = require(

Typescript , How to infer type from another property value?

For example, I have an interface with properties: key and value, I want to infer value type by the key. interface Obj { a: number; b: string } interface Param&

SvelteKit - Deployment - @sveltejs/adapter-static not updating static paths in fallback page

I'm exploring SvelteKit for the first time, I built my simple first application and I'd like to deploy it to my Apache server as a static page As far as I under

MaterialUI 5 : TypeError: Cannot read properties of undefined (reading 'create')

After I created ThemeSetting.tsx context I cannot use <Button><Button> and all things that use theme of materialUI ReactJS , Typescript error TypeEr

Typescript match first uppercased letter on type level

I want to transform a string literal from camelCase to snake_case, like: type CamelCaseStr = "helloWorldAgain" type _ = ToSnakeCase<CamelCaseStr> // "hell

How can I make one property non-optional in a typescript type?

I have this type: type User = { id: string; name?: string; email?: string; } And I would like to construct a similar type with name non optional: type U