Skip to main content
Filter by
Sorted by
Tagged with
-4 votes
0 answers
26 views

How to be good at programming? [closed]

So, Hello... I am interested in programming and I am still learning my best regarding that. But I still feel weird and not good enough however I tried. Is there any way to be better at it? I learned ...
Flacca's user avatar
  • 1
1 vote
0 answers
12 views

Angular 16: My form's input values are not cached by the browser when the form is inside an ng-container

In my Angular project I have the following form. test.component.html: <ng-container *ngIf="{ loading: loading$ | async, options: options$ | async, } as vm" > <form [...
Eirini Tepelidou's user avatar
0 votes
1 answer
20 views

Angular 17 SSR, detect component output event subscribed or not

Using Angular 17 SSR, developing a toolbar component, which carries action button. This is a generic button. Here Im trying to detect component output event are observed or not, depending which ...
Varanasi Phaneendra's user avatar
1 vote
1 answer
40 views

React component with "as" property that points to another component and inherits it's properties too

I want to create a MyComponent with an "as" property which allows it to inherit the properties of the as component, such that I can get TypeScript typings. e.g. Usage with HTML elements: <...
Kernel James's user avatar
  • 4,004
0 votes
0 answers
20 views

How can I use web material 3 components in a code that uses react typescript + vite

Is it possible to use web material 3 Google components in React TypeScript + Vite ? I tried to use it as follows import '@material/web/checkbox/checkbox.js'; function App() { return ( <div ...
robert's user avatar
  • 19
0 votes
0 answers
11 views

Typescript ESLint Issue - Could not find rule in plugin

export default [ { languageOptions: { parserOptions: { ecmaVersion: 2023, sourceType: 'module' }, }, ...compat.extends('airbnb-typescript/base').map((...
Theodore Lau's user avatar
0 votes
0 answers
12 views

getQueryData always returns undefined even when set with useMutation - TanStack Query, React

When I try to read cache content of given key I receive undefined even after I call useMutation with exactly same key. Mutation used to set cache (mutation returns proper data, as expected): const ...
jazzgot's user avatar
  • 380
0 votes
0 answers
8 views

Next-themes doesn't change theme

I am using next-themes in my project to enable dark-mode. Theme changes based on the system preferences due to attribute="class". The icons change on click but the theme doesn't. ==> _app....
abarana's user avatar
0 votes
0 answers
21 views

How to typesafely filter an imutable array of arrays with unique values and keys?

class Constants { static readonly STATES_AND_ACRONYMS = [ ["AA", "NAME_A"], ["BB", "NAME_B"], ["CC", "...
Rafael Santiago Altoé's user avatar
1 vote
0 answers
17 views

implementing Incremental Static Regeneration(ISR) without keyword "fetch"

I've tried many ways to make my one page in this web app build in ISR- this app uses Google Spreadsheets as a database and the user fills out the spreadsheet, and it populates the page. I want it to ...
Ryan's user avatar
  • 13
1 vote
0 answers
18 views

Typescript conditional type does not accept value even when all branches do

The following code: interface Base {} type Foo<T> = T extends "a" ? Base : T extends "b" ? Base : Base function run<T>() { const x: Foo<T> = {} }...
Petr's user avatar
  • 9,935
1 vote
1 answer
19 views

TypeScript: Automatic Type Inference for Object Property Values Based on String Key

I have a task where I want a function in TypeScript to accept a string key of an object and infer the type of the value that the key points to. I'm almost there, but I'm running into an issue where ...
user9582211's user avatar
0 votes
0 answers
14 views

Alpine.js data update not reflected in the frontend

I'm creating a small app using Alpine.js in Typescript, but ran into an issue with my property change not being reflected in the frontend. I want to change the property progress inside my Group ...
Yami's user avatar
  • 1,425
0 votes
0 answers
25 views

why is my input not registering text or capturing the value of what i am typing in?

Im working on some code thats using react hook form to capture input states and im not exactly sure why when I type into the input, specifically the one with the placeholder text of "Or search ...
mattangel's user avatar
0 votes
0 answers
12 views

How can define type for createAsyncThunk in Redux?

I have defined an async function as follows: export const fecthAddress = createAsyncThunk("user/fetchAddress", async function () { const positionObj = await getPosition() as { coords: { ...
amir tbi's user avatar
  • 501
0 votes
0 answers
9 views

Problems publishing to a private npm registry (CodeArtifacts) using Lerna

I'm looking to move from public npm registry to private npm registry hosted in AWS. The cmd that we are using to publish to a private registry is lerna publish --conventional-commits --conventional-...
RoverGrover's user avatar
0 votes
0 answers
42 views

React (TypeScript) - Unable to Use Process Environment

I am working on building my first React application (using TypeScript), however I am running into an issue building the application while trying to use environment variables. My folder structure is: ...
Dominick's user avatar
  • 476
0 votes
0 answers
22 views

Request fails when sending from fetch but succeeds in api client

I am sending the following fetch request: try { const response = await fetch(`http://localhost:3000/fs`, { headers: { Accept: "*/*", method: "readFile&...
Ethan's user avatar
  • 1,316
0 votes
1 answer
16 views

How to fix typescript error @types/express-serve-static-core/index has no exported member

I'm facing these errors after changing node from 14.18.0 to 20.16.0: ../node_modules/@types/express/index.d.ts node_modules/@types/express-serve-static-core/index"' has no exported member '...
anayarojo's user avatar
  • 1,199
1 vote
1 answer
38 views

Is the method subscribe in angular 17 is not working

export class HomeComponent implements OnInit { data: any; constructor(private apiService: ApiService) { } ngOnInit(): void { // Substitua 'your-endpoint' pelo seu endpoint real this....
Alelix's user avatar
  • 13
-2 votes
0 answers
17 views

Erreur hook call développement d'application TypeScript [closed]

Bonjour, Je développe une application apple depuis un an maintenant, j’aimerais ajouter l’option de déconnexion pour mes utilisateurs qui ont créé un compte, mais je rencontre de nombreuses erreurs. ...
La Popoterie's user avatar
-1 votes
1 answer
46 views

Fetching API/JSON For A NextJS Application

I am creating a NextJs website related to crop disease detection which sends photo and environmental factors to a fastapi python server where the data gets processed and then display that in a ...
Warrior's user avatar
  • 13
0 votes
0 answers
24 views

How to Inject Color and Control Size of Dynamically Fetched SVGs in React?

I'm working on a React application where I need to fetch SVG icons from a URL and apply a custom color to them based on a value from my Redux store. Additionally, I want to ensure that the SVG scales ...
bo bo's user avatar
  • 1
1 vote
1 answer
22 views

Custom error handler pipe operator function for RxJS

My goal is to create a new custom RxJS pipe operator which can handle every input like this constructor(private errorHandler: ErrorHandlerService) { const voidStream$ = of() as Observable<void>...
Christopher's user avatar
0 votes
1 answer
14 views

beforeSoftRemove hook not updating database entry using Nest.js and TypeORM

I want to implement a solution in Nest.js and TypeORM application that every record that is getting created should have createdById, updatedById and deletedById against their actions. Let me share the ...
Muhammad Zeeshan's user avatar
0 votes
0 answers
12 views

React Native Skia chart not reactive (interpolation?)

I'm building a chart with react native skia, the chart has a few data options (eg. 8h, 24h, 7days etc.). Initially the chart works perfectly fine, but when I change to a different data option a few ...
Adam Waśniewski's user avatar
1 vote
1 answer
43 views

Type inference for autocomplete param's value of an overloaded method

I'm trying to add some autocomplete support for a param of generic method subscribeToTelemetry<T extends keyof TypeMap>(name: T): Stream<TypeMap[T]>; subscribeToTelemetry<T extends ...
Humberto's user avatar
  • 370
1 vote
1 answer
40 views

Angular 18 Migration: 'TypeError: res is not iterable' Error due to spread operator

I recently migrated my Angular project from version 9 to version 18. After the migration, I started encountering the following error: ERROR TypeError: res is not iterable onEscalate details....
Saurabh's user avatar
  • 81
0 votes
1 answer
26 views

Advanced typescript: find all the values of the key "id" in a nested object

I'm trying to extract all the values of the keys "id" in the object, at the first level and at all the nested levels. Given my ExampleType, I want NestedID<ExampleType> to be "one&...
David Alvarez's user avatar
-4 votes
0 answers
22 views

How to fix error 500 FUNCTION_INVOCATION_FAILED

So I created a simple API Website that can calculate like add, subtract, multiply and divide. Using express.js and ts-node and I hosted it on Vercel. Once I created /api/index.ts, and installed the ...
Syaamil Maulana's user avatar
2 votes
0 answers
14 views

How to Enforce Type Dependencies Between Object Properties in TypeScript Function Parameters? [duplicate]

I am attempting to create a function that takes a parameter P, which is an object with the following limitations: P may have a property of type Transformers which is defined as { [key in keyof T]?: (...
Guy Passy's user avatar
  • 773
0 votes
1 answer
18 views

Mock being ignored, jest node

I'm trying mock a database with this test but the mock seems to be ignored. I can't think of a reason this could be? import { jest } from '@jest/globals'; jest.mock('../database', () => ({ ...
Ed Lynch's user avatar
  • 615
0 votes
1 answer
25 views

Angular 17 unable to debug with vite dev-server

I have an angular 16 app that I have successfully upgraded to 17. The app is fully standalone. When I try to debug it in vsCode, launching ng serve form the debug menu builds the app and starts it. ...
Alfonso Moscato's user avatar
0 votes
0 answers
29 views

My apk file build is successful but app is crashing?

My apk file build is successful for preview profile and apk is also installed successfully but it is not opening I am getting this error Error Screen This is the error I am facing in logcat? 2024-08-...
Rohil Gupta's user avatar
0 votes
0 answers
19 views

Typescript group modules like namespaces in C#

The issue I work with DTO pattern and in general I use a domain-driven design, so I have many DTO, DM, types and interfaces, enums etc. So eventually there will be a mess and it may get difficult to ...
ben berizovsky's user avatar
0 votes
0 answers
19 views

TS2307: Cannot find module 'portal/PortalApp' or its corresponding type declarations

I am getting an error TS2307: Cannot find module 'portal/PortalApp' or its corresponding type declarations in the WebPack, React, TypeScript, Micro frontend project. In the localhost server I am ...
Noventiq's user avatar
0 votes
0 answers
14 views

TypeORM can not order by on addSelect field

I have this code block: async getReceiptsForTimeline( userId: string, getTimelineInput: GetTimelineInput, ): Promise<ReceiptCursorBasedPaginatedResult> { const { cursor, take = 10, ...
minikdev's user avatar
  • 101
0 votes
0 answers
25 views

Drizzle ORM - Typesafe JSON Returns malformed array literal

when I have a type safe json array in my schema like this: HistoricalData: json('History').$type<historyData[]>() and I try to update like this: const id = await db .update(...
Oliver Gewohn's user avatar
0 votes
0 answers
7 views

ExTester Automated Test Visual Studio Code Change version on the Extension Plugin

When I open the plugin extension page, When I click Uninstall more actions button, Then install another version and uninstall options listed, And other versions listed to change version of the plugin. ...
Andrew's user avatar
  • 280
1 vote
2 answers
35 views

How could I increase minimal range in mat-slider element of Angular framework

I'm using Angular v16. I'm creating a range slider using mat-slider element. By default, the logic is that maximal value cannot be lower than minimal value, but they can be equal, so minimal range ...
lia-ail's user avatar
  • 13
-1 votes
0 answers
29 views

Problems with CORS when using Google OAuth2 in Spring boot/React app

I'm working on a React frontend that communicates with a Spring Boot backend. My goal is to secure certain endpoints on my Spring Boot server using JWT, which includes role information. Current Setup: ...
Emma Johnson's user avatar
-1 votes
0 answers
34 views

Select all merged rows in a table with merged rows (using rowSpan) only having single checkbox for merged rows [closed]

I want to build a table using antd design (and React) where all merged rows (using rowSpan) can be selected with a single click on the checkbox. The merged rows should also only have a single checkbox....
sg_dev's user avatar
  • 1
0 votes
1 answer
53 views

Missing order of execution on class

Multiple times, I find myself in the same situation. My types are not correct and I need to do extra verification somewhere. I have created a very simple example, we have a Car class, inside we can ...
Raphael Rlt's user avatar
0 votes
0 answers
11 views

material-react-table package enableTopToolbar show hide customization

Im using material react table here in enableTopToolbar true then top toolbar is visible with option show/hide column but i don't want the default settings.I want to customize it with my own icon but ...
bharti thakur's user avatar
0 votes
0 answers
24 views

How to securely expose the app version from package.json using ES Modules?

I'm currently using ESM in my TypeScript + Next.js project, and I want to log the application version from my package.json file to the client console. Here is the code snippet I'm using in a global ...
Joacco's user avatar
  • 3
0 votes
1 answer
20 views

Expo React Native : Build failed: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information

I can't build my application with expo for android. Everything works fine on emulators. I launch the command line eas build -p android --profile preview With this config in my file eas.json { "...
Dufour Sviatoslav's user avatar
-1 votes
0 answers
35 views

How to turn number into string literal type

I have this code that I use instead of using enums export const MyVal = ['Monkey', 'Horse', 'Table'] as const; export type MyVal = (typeof MyVal)[number]; It works well unless you want to turn a ...
Sergino's user avatar
  • 10.6k
0 votes
0 answers
9 views

Indentation Rule in SonarLint for Typescript

I am new to sonarLint rules, I am trying to findout the rule for indentation and variable naming in typescript rules.But couldn't find it. I was able to find naming rules for classes and functions but ...
Rishik Bhimavarapu's user avatar
0 votes
1 answer
30 views

How to handle empty initial state in redux which is to be populated later

I am having some problem using redux with ts my initial state is {} and later it is populated with keys and values so when I try use that state in my component, its saying that this property does not ...
Tahir Reyaz's user avatar
0 votes
0 answers
11 views

MongoDB Change Stream Triggered by updatedAt Field Only: How to Handle?

I'm using MongoDB change streams with Mongoose to monitor changes in my Instances collection. Here is the code I'm working with: Instances.watch(watchFilter, { fullDocument: "updateLookup",...
VusalIs's user avatar
  • 33

1
2 3 4 5
4667