Skip to content

Support stage 3 decorators #1109

@RobinVdBroeck

Description

@RobinVdBroeck

Is your feature request related to a problem? Please describe.
Currently, we are stuck on the old experimentalDecorators setting of typescript because this library uses the old decorator syntax instead of the current stage 3 proposal: https://github.com/tc39/proposal-decorators

Describe the solution you'd like
Add a new library that can be used that exposes stage 3 decorators instead of the experimental decorators.

This can even be in the main package, under another import path.

import { Cacheable, CacheClear } from `@typecacheable/core`; // would import the legacy decorators until a major release.
import { Cacheable, CacheClear } from `@type-cacheable/core/modern`; // would import the stage-3 decorators

Describe alternatives you've considered
Removing this decorator all together from our code base. However, this is not feasible since it's a nice pattern + would require a major rewrite.

Additional context
This blocks us from using more modern tooling like tsx, esbuild instead of typescript directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions