235,131 questions
0
votes
2
answers
15
views
Property children is missing in React
I have the following code snippet:
type CitationProviderProps = {
bibUrl?: string
citationMap: CitationMap
children: React.ReactNode
}
export function CitationProvider({
bibUrl,
citationMap,...
0
votes
0
answers
10
views
Playwright: Unable to enter formula in Excel Online cell (A1) despite clicking and focusing
I'm automating Excel Online using Playwright (TypeScript) and trying to enter =TODAY() in cell A1. However, despite clicking the cell, moving the mouse, and even double-clicking, the formula isn't ...
-1
votes
1
answer
19
views
Bad Option: --env-file=./env/.env.dev
I am unable to load the env file via start script in my package.json file because of which I am not able to work on my project, earlier with all these stated settings it used to work fine.
package....
1
vote
1
answer
32
views
How can I automatically format dates according to the OS's locale in Angular without manually setting LOCALE_ID?
I am building an Angular application and want to format dates based on the user's operating system locale (or browser's default language) without manually setting the LOCALE_ID for each case.
While ...
-1
votes
0
answers
21
views
Browser extension injected style conflict [duplicate]
I'm developing a browser extension using WXT and Vite. My extension's UI is injected into web pages via content script, but I'm getting style conflicts where the webpage's styles override my extension'...
2
votes
0
answers
14
views
How to Handle Incomplete Date Entries in Angular Form Control with <input type="date">? [duplicate]
I'd like to warn my users if they enter an incomplete date. The field is not required though
I tried listening to the changes of the field using the (blur) / (keyup) attributes, but if the date is ...
0
votes
0
answers
13
views
How to get the value on the child using the emitter and pass it to the parent grid table in angular 19
grid-table.component.ts
export class GridTableComponent implements OnInit {
@Input() gridOptions!: GridOptions;
@Input() rowActions!: any;
@Input() activeRowTriggered!: any;
...
0
votes
0
answers
13
views
Inertia Js , React Problem To Handle Laravel Returned Errors
ok, I've been using inertiaJs for a little over 1 year, only it's as if
inertia can no longer receive data from the backend.
for example, here's the simple authentification form I send:
const ...
0
votes
1
answer
40
views
Type guard - index of an object
Given the function below, I would like to be able to create a type guard for an object/array, indicating whether it has an index or not, whether it's a property or an index. Is this possible in any ...
0
votes
0
answers
8
views
How to get TypeScript paths working in Sanity Studio?
Trying to get TypeScript paths working in my Sanity Studio project but for some reason I'm getting errors:
[vite] Internal server error: Failed to resolve import "@utils/index" from "...
0
votes
1
answer
24
views
How to Build a Type-Safe Data Processing Pipeline in TypeScript?
big data apps often involve complex data transformations - filtering, mapping, aggregating, etc. Ensuring type safety in these dynamic pipelines can be tricky.
How can a flexible, type-safe function ...
0
votes
0
answers
19
views
Typescript tsconfig ignored
I am getting a typescript error that shouldn't happen because the tsconfig should prevent it from being compiled. In my tsconfig file I have skipLibCheck set to true. I have the node_modules folder ...
-1
votes
0
answers
18
views
Why am I getting an error when trying to refactor Typescript to another file using VS Code?
I'm trying to refactor Typescript by selecting a function in a ts file, using the right click context menu and selecting>refactor>move>move to a file and choosing an empty new ts file, but I ...
0
votes
1
answer
24
views
All the services return as a undefined in Global Interceptor in NEST JS
I am trying to create a global interceptor in NestJS and call a service inside it. I have followed all the documented steps, but all the services used within the interceptor are still returning as ...
0
votes
0
answers
19
views
Getting gibberish file when trying to download a mp3 file using playwright
So, I am trying to create a scraper for a online playlist and using playwright as I have been trying my hand at this framework but when downloading a mp3 file, no matter whatever I try using different ...
0
votes
1
answer
25
views
How can I "inline" typescript dependencies?
I have a project that depends on 3 external dependencies
I'd like to inline those in my project such that their code is under a single source tree and I can remove them from package.json
Is there a ...
0
votes
0
answers
13
views
Class extends value undefined is not a constructor or null - circular dependency
When I am triying to generate migrations I get this error
Error during migration generation:
Error: Unable to open file: "/home/angel/Contenedores/nestjs/plantilla/src/database/config/typeorm....
0
votes
1
answer
48
views
Angular JS Angular 18 hybrid routing
I have an angular js/angular 18 hybrid application which is working, but what I am trying to do is migrate the routes of the customer users like this:
.state('customer', {
url: "/...
0
votes
0
answers
35
views
ESLint Configuration Problems after Vite Update
I've recently updated NodeJs to v22 and subsequently Vite but the configuration seems to have changed quite a bit from the previous version.
When I initialize a new project from scratch with npm ...
0
votes
0
answers
12
views
Filtering feature not applying while using react ag-grid 33.1
Im using ag grid community in my React ts project, i've used it before and usually I would only add filter: true to defaultColDef and the filter feature would apply but its not working for me now.
...
1
vote
1
answer
29
views
Issue with noImplicitAny in TypeScript
let a;
function f3() {
let x = []; // Error: When the type of variable 'x' cannot be determined, it implicitly has the type 'any[]'.
x.push(5);
function g() {
x; // Error: Variable 'x' ...
0
votes
0
answers
24
views
--only-shell and --no-shell fails Playwright deps installation on CI [closed]
Updated playwright to the latest 1.50 version.
channel: "chromium" added to playwright.config.ts as described in the docs
On CI added command
yarn playwright install-deps chromium --only-...
2
votes
3
answers
104
views
How to use discriminated union without discriminating
Is there a way to use a discriminated union in TypeScript without discriminating (the following is a React based example, but that is a detail).
Given the following types:
enum Options {
ONE,
...
0
votes
1
answer
14
views
state persistence - cells not expanding upon setting state
I am working on adding state persistence to my application and have come across an issue where the cells are not expanding when they should be.
<igx-tree-grid igxGridState #...
0
votes
0
answers
10
views
I tried running ProtonMail locally and test it, however, I'm getting error related to "Abusive Traffic Coming from Network", how to fix it?
One of my friend asked me to deploy ProtonMail web client as a task for further work. So initially before deploying it on an actual linux based server, I wanted to test it by running it locally on my ...
0
votes
1
answer
46
views
How to infer a specific generic type in a TypeScript interface without explicitly defining all generics?
I have this interface:
export interface IComponent<
TSizeType extends TSize = TSize,
TShapeType extends TShape = TShape,
TVariantType extends TVariant = TVariant,
TElevationType extends ...
1
vote
1
answer
29
views
Get class type from a factory function passed in argument
I'm trying to generate dynamic controllers in NestJS via factory functions, I'm doing a uniform output response, I mean for example if normal output is {"id": 1} the output will be {"...
0
votes
0
answers
33
views
Refresh token google sheets [closed]
Error: No access, refresh token, API key or refresh handler callback is set.
I already signed in successfully. I got refresh token too. But after that I am trying to access and get data from google ...
1
vote
1
answer
45
views
How to type-check a Record where each entry is the same type, but is passed a different generic?
Here's a contrived example: we want to create an object that contains methods for converting different kinds of data to and from strings.
type Stringifier<Source> = {
stringIn: (string: ...
1
vote
0
answers
28
views
How to execute two select statements in parallel on same tables?
We are seeing that 'getManyAndCount()' is taking approximately 10 seconds to execute 2 queries. First query is to fetch the paginated resultset and second query is to fetch the total records count.
...
0
votes
0
answers
17
views
Better Auth CLI: Cannot find module @babel/core
I've been setting up Better Auth in my Next.js project for quite a while now, and I can't seem to make the Better Auth CLI to work which is
npx @better-auth/cli generate and npx @better-auth/cli@...
-1
votes
0
answers
23
views
Next.js library imports not working in server components
After updating my Next.js component library from ver. 1.2.0 to 1.3.0, existing server-compatible components suddenly break when imported into Next.js server components (e.g., page.tsx).
I added a new ...
1
vote
1
answer
28
views
react typescript localstorage Argument of type 'string | null' is not assignable to parameter of type 'string'
I'm doing an app where i use redux toolkit and localstorage to save the theme.
I have this slice :
import { createSlice } from "@reduxjs/toolkit";
const mode = !localStorage.getItem("...
0
votes
0
answers
14
views
Summernote uploading image problem (outside of note-editable)
I have problem regarding uploading image sometimes inside the editor. When I upload image, image is going outside of note-editable div. I saw that some people has same problem but I did not find the ...
0
votes
2
answers
27
views
Type alias for class specialisation
Given:
class BaseClass<T extends string | number> { public myFunc(): T = {} }
I can specialise by doing this:
class StringBaseClass extends BaseClass<String> { }
and create a new instance ...
0
votes
2
answers
36
views
how do i solve Module not found: error in react?
here is my structure:
src/homepage
src/components/login
src/components/signUp
enter image description here
homepage code:
import React, { useState } from 'react';
import './index.css';
import "...
0
votes
0
answers
12
views
Ng serve with linked npm package with watch enabled compiling too slow after edits in package
Preconditions:
Angular 14
npm package that is linked locally with npm link and is building with tsc && (concurrently "tsc -w" "tsc-alias -w")
I need to import package from ...
0
votes
0
answers
9
views
eslint-plugin-compat not linting unsupported feature
I'm using "eslint-plugin-compat": "^6.0.2",
along with some other eslint dependencies:
"eslint": "^7.0.0",
"eslint-config-google": "^0.14.0",...
0
votes
1
answer
34
views
How to convince typescript that a record has a value?
If I have this declaration:
type MyAwesomeLookup = Record<string, number>
How can I then write a hasNumber type guard that makes this compile without errors:
const lookup = { [Math.random()....
0
votes
0
answers
24
views
Global var variable is not recognized as used in my next js application
In my next js application I am trying to connect mongodb by using cached status. But there the type erros has occured by saying global var mongoose variable is not regognizing as used. How can I solve ...
0
votes
1
answer
58
views
Puppeteer executing the first click action in an array immediately, regardless of delay
I'm facing a seriously weird issue with puppeteer, running on Chrome.
I have an array of click actions I want to execute on a webpage, which has a pdf.js based slideshow. Each action consists of ...
-1
votes
0
answers
36
views
I can't understand. why this data is return to array
My team develop the project that use in high school. and this code has problem that I can't understand. Please help me.
enter image description here
In collections table, collection_id is primary key.
...
0
votes
1
answer
40
views
Type safety while looping over Object.entries()
I'm working in a monorepo where I define API schemas in a shared module using Zod. These schemas specify endpoints, HTTP methods, and response types, ensuring type safety between the client and server....
0
votes
0
answers
17
views
ts-alias replace the import path unexpectly
I am using ts-alias https://www.npmjs.com/package/tsc-alias to replace the path alias in typescript, the command in package.json look like this:
"scripts": {
"build": "...
0
votes
0
answers
13
views
How can i set ignore paths, when i use ts-prune?
I use ts-prune to find dead code. But some variables/functions I want to ignore.
Making file .ts-prunerc with:
{
"ignore": "src/....path"
}
doesn't resolve my problem.
0
votes
0
answers
25
views
How to make Visual Studio Code recognize the typescript path alias
Today I added typescript alias with my project, this is the tsconfig.json:
{
"compilerOptions": {
"target": "ES2020",
"module": "esnext",
...
-1
votes
0
answers
16
views
Importing and using three-geo in React-Typescript
In my project I need to implement a 3D Map which is in the best case fully open source (and free of charge apart from tiles) hence, and for other reasons, mapbox-gl is not an option.
I found the JS ...
-3
votes
0
answers
27
views
Getting error "Cannot find module 'graphql-upload' or its corresponding type declarations." in Node TypeScript application
I have created a Node application which uses TypeScript and below I have defined my tsconfig.json:
{
"compilerOptions": {
"module": "commonjs",
"...
1
vote
1
answer
54
views
Using nested rxjs iif operators not working as expected [closed]
The following is just a section of the code, but should be enough.
In this case the allocateEquipment gets called when eq is an empty array and dryRun is true.
...
tap(a => console.log(a)), // ...
1
vote
0
answers
43
views
How to write a generic type with properties based on the same concrete type
This is some code that I've been trying to write but I don't seem able to make it do what I want it to do. I've been at it on and off for a few weeks. This uses React but I don't think it's React-...