64 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
84
views
TypeScript complains about optional chaining
I am using TypeScript 5.7.3.
Installed @types/[email protected].
TypeScript config:
{
"compilerOptions": {
"target": "ES2020",
"moduleResolution": &...
2
votes
1
answer
77
views
Overwriting default values in parent constructor in javascript/typescript
I have an abstract Typescript class with a constructor. This constructor accepts an object and then tries to set properties of the class with the data in the object.
export default class AbstractModel ...
1
vote
1
answer
668
views
Typescript transpiled code "*.js" missing in imports
I have the following code (example):
User.ts
...
import { UserFavoriteRoom } from "./UserFavoriteRoom.js";
import { Room } from "./Room.js";
import { Reservation } from "./...
7
votes
1
answer
4k
views
What is the difference between 'bigint' (lowercase) and 'BigInt'?
So I am trying to update some typescript code that uses external library for big numbers to BigInt (ES2020) and linter is complaining a lot.
I don't really understand what is going on here.
It looks ...
user avatar
user18883345
0
votes
1
answer
388
views
Working with native dynamic ES2020 modules in TypeScript (without Node.js) and typing things
I have a TypeScript application working with es16 modules, most of them are imported statically. I want to use a (validator-) module now that is only imported in debug mode. It's all working, but I ...
0
votes
1
answer
723
views
when running app.ts file i get the error EntityMetadataNotFoundError: No metadata for "user" was found
i have this project on expressjs and I use typeorm and typescript. the problem is when i run project on develop mode (with app.ts), with the first request i get the error:
node_modules/src/data-source/...
4
votes
0
answers
683
views
upgraded to latest nx workspace, test fail with transform
We are upgrading angular with nx workspace to latest
The problem is when we run test, we got following errors
feature-flag.mjs:93:20: ERROR: Transforming for-await loops to the configured target ...
1
vote
0
answers
182
views
export 'catchError' was not found in 'rxjs' when tsconfig.json target is ES2020 in angular 14
I have updated my angular library project to angular 14 and while and building my app I am getting
following Error
Command
ng build --base-href /home/ --configuration production
ERROR:
/node_modules/@...
0
votes
1
answer
186
views
Destructure object into 2 separate objects in one call
is there a 1-step way to destructure object into 2 objects using some defined set of props.
For example, having initial object
const obj = {
prop1: "Prop1",
prop2: "Prop2",
prop3: &...
1
vote
1
answer
3k
views
Optional chaining doesn't work on Node 16.4
I have tried this syntax in VSCode and Coderpad (both use Node version 16.4).
let x = {}
x?.something.foo
As far as my understanding goes, this code shouldn't throw an error now, but return undefined....
4
votes
1
answer
290
views
Are private fields of subclasses of built-in classes not accesible inside overriden methods?
I have the following class that extends the built in data type Set. It adds a little bit of extra functionality by checking that every element that wants to be added to the set conforms to the type ...
3
votes
0
answers
645
views
Is NestJS compatible with es2020 typescript?
when building a skeleton NestJS app, it sets es2017 in tsconfig. When trying to change it to es2020, it seems to work but hard to say without testing everything. I was unable to find any insights ...
1
vote
1
answer
3k
views
How to get Typescript to compile CommonJS imports?
I have written a TS file, that loads in a 3rd party package, using import XXX { YYY, ABC, 123 }from 'XXX';
It will compile to CommonJS no issue, and thats OK. But I'd like to compile it to an ESModule....
3
votes
1
answer
2k
views
How to run Typescript ES6+ server side via .net core and nodejs using Jering.Javascript.NodeJS
I want to run some TypeScript Code written in ES2020 on Server Side. Currently i have running a ASP.NET Core Application so the idea was to run js via Jering.Javascript.NodeJS and nodejs.
So started ...
0
votes
1
answer
2k
views
Cant use BigInt in TS project regardless of es2020 [duplicate]
I have simple TS project where this is my tsconfig.json
{
"compilerOptions": {
"target": "es2020",
"lib": ["es2020"],
}
}
And I have one ...