Skip to main content

Questions tagged [typescript]

TypeScript is a typed superset of JavaScript that transpiles to plain JavaScript. It adds optional types to JavaScript. This tag is for questions specific to TypeScript. It is not used for general JavaScript questions.

0 votes
0 answers
7 views

Adding security groups on inbound rules of RDSproxy through AWS cdk

Hello StackOverflow people, I want to add full inbound traffic within my VPC so that any sagemaker users in my team can access my RDSproxy.I am using a postgres database with tcp 5432. In the CDK, I ...
Matt Allam's user avatar
-1 votes
0 answers
11 views

How to generate the typescript API document from `.d.ts` file?

How to generate the typescript API document from .d.ts file? I tried typedoc to transfer this library: % npx typedoc index.js [warning] The entry point ./index.js is not referenced by the 'files' or '...
qg_java_17137's user avatar
0 votes
0 answers
18 views

Can I write a TypeScript interface describing an object that doesn't inherit from `Object`?

This is only a hypothetical question, i.e. it doesn't represent a real problem. It arose from writing an article about how classes work in JavaScript, expressing some weird consequences about their ...
Pete's user avatar
  • 12.4k
1 vote
1 answer
17 views

Typescript reach defined type from variable in Angular

interface Bus { id: number; test?: string; } interface Area{ id: number; load?: string; } type TypeMap= { Bus: Bus, Area: Area, // etc } func1(){ const equipmentType1 = "...
once in an blue moon's user avatar
0 votes
0 answers
17 views

Infer type of Object using a schema (an array of objects)

I'm trying to infer the types of objects using a schema. This schema is an array of a objects containing all properties of the field. type Field = { name: string kind: 'string' | 'integer' | '...
Belizário Ribeiro's user avatar
0 votes
1 answer
26 views

How to prevent tab changes in PrimeVue v3 TabView?

I am using PrimeVue V3 TabView with composition API. Inside each tab I have a form and I want to trigger form validation before switching tabs. So I need to interrupt the tab change, do something (...
TinyTiger's user avatar
  • 2,162
0 votes
0 answers
19 views

how to apply open-close principle on hierarchical typescript data types

let's imagine the following types autogenerated: I cannot change them. type BaseProblem = { name?: string; description?: string; } type SimProblem = BaseProblem & { type: "sim&...
Bertuz's user avatar
  • 2,518
0 votes
0 answers
8 views

EPIPE error when starting Vite and React project

I'm facing a problem when trying to start my application using Vite and React, published through Jenkins and monitored by Grafana. The EPIPE error occurs repeatedly, and the application constantly ...
Wesley Raeel's user avatar
0 votes
0 answers
17 views

Docker & gVisor

I am making a server that is a code runner that runs on a docker container : the user send the code and I make a file for it and then run it the problem is when running harmful code. like if he sends ...
Dracule Mihawk's user avatar
1 vote
0 answers
7 views

redefine pointer to function inside another function [duplicate]

How can I redefine a pointer to a function inside another function? In this example, "ptr" must print "hola" (it doesn't work). type OnLog=()=>void; let ptr:OnLog = ()=>{}; ...
J. Pablo García's user avatar
0 votes
0 answers
13 views

update imports across all files after mass replacing a method header in subclasses

I have a method defined in a superclass, that is also defined in 32 subclasses async fetchDepositAddress (code: string, params = {}): { I updated this method to add a return type async ...
Sam's user avatar
  • 2,070
0 votes
0 answers
11 views

Multer s3 upload: File in s3 not playing and file increase

I am uploading a mp4 file to s3 via node.js s3. The code works and I see the file in the s3. However The original file is 860kb but when uploading it it turns to 1.4MB and when I download it from S3 ...
ThunD3eR's user avatar
  • 3,356
0 votes
1 answer
23 views

Angular 16 RxJs Issue Updating Total on Header Component

Hello I have an question regarding my Observable. I have a cart as well as checkout that works fine when I add a another items to cart it handles total items as well as total cost. These components ...
user2280852's user avatar
0 votes
0 answers
10 views

How to use a Web Worker bundled in an NPM package in a NextJS application

Github Repo to reproduce issue: https://github.com/kyledecot/next-worker-bug I have a NextJS application and an NPM package. The NPM package is bundled using webpack/ts-loader and contains a web ...
Kyle Decot's user avatar
  • 21.1k
2 votes
1 answer
27 views

Race condition when using Lodash's _.once function

For example, take the following code: const fetch = _.once(myRealFetch) const queue = new PQueue({concurrency: 1000}); queue.add(function() { const result = fetch() // Rest of the code ... }) ...
Tomer Horowitz's user avatar

15 30 50 per page
1
2 3 4 5
15498