typeorm / typeorm

ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
http://typeorm.io
MIT License
33.97k stars 6.26k forks source link

Instead of experimental decorators use the full version of decorators introduced in TS 5.0 #10869

Open venkateshwarant opened 4 months ago

venkateshwarant commented 4 months ago

Feature Description

I'm keen in keeping up my codebase modern, well maintained and doesn't want to be left out.

Now that decorators are a real thing with Typescript 5.0. It is finally the time to actually remove these two typescript configurations.

"emitDecoratorMetadata": true,
"experimentalDecorators": true,

This tech debt in typeorm blocks me from using the full version of the decorators introduced in TS5.0

The Solution

Here are some of the examples on implementing the decorators with experimental flags disabled. https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#decorators

Also, decorator metadata is introduced in typescript in 5.2 https://devblogs.microsoft.com/typescript/announcing-typescript-5-2/#decorator-metadata

As typeorm is already on typescript 5.3.3. I don't see any issues in migrating the decorators.

Considered Alternatives

I don't see any alternatives for this issue. If we don't keep up with the constantly evolving typescript version, I'm afraid most softwares wouldn't be able to use typeorm.

Additional Context

No response

Relevant Database Driver(s)

Are you willing to resolve this issue by submitting a Pull Request?

Yes, I have the time, and I know how to start.

markedwards commented 4 months ago

This seems to be a duplicate of #9862

Malix-Labs commented 1 month ago

Duplicate of #9862