Implement legacy TypeScript decorators and metadata with native NestJS acceptance
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- node.js, typescript
Research direction
Start by reading issue #238 and the compiler’s decorator lowering and metadata paths; the payload does not name specific files or tests. Compare emitted behavior against TypeScript output under the pinned Node oracle, then run the differential, NestJS, and plain and sanitized acceptance gates. Done means the listed decorator and metadata cases pass, the real NestJS example builds and runs natively, and unaffected programs retain zero-cost validation.
Written by the indexing model from the issue text.
Description
Existing NestJS applications use TypeScript's legacy decorator semantics (experimentalDecorators) and emitted design-type metadata. scriptc currently adopts neither option and supports only a restricted subset of newer class decorators. Issue #238 reports the resulting constructor-parameter decorator refusal.
Implement a coherent legacy decorator pipeline that preserves the original TypeScript checks and lowers decorations to existing native calls, objects, and property descriptors. Keep the current newer-decorator behavior intact and avoid changing code generation for programs that do not use legacy decorators.
Acceptance:
- Class, property, method, accessor, constructor-parameter, and method-parameter decorators, including static members, factories, generic standard decorator signatures, descriptor changes, and permitted replacements.
- TypeScript-compatible expression evaluation, application, static-initialization, inheritance, and class-binding behavior.
emitDecoratorMetadatadesign types, parameter types, and return types, including imported runtime types, erased types, type-only imports, and forward-reference behavior.- Actual
reflect-metadatapackage execution with stable constructor/prototype/method identity and own/inherited lookup behavior. - A pinned real NestJS example that builds to native code and exercises dependency injection, an HTTP success response, a missing route, and clean shutdown. Do not substitute framework stubs or Node-island execution.
- Differential tests using TypeScript-emitted JavaScript under the pinned Node oracle, diagnostic and module-order baselines, per-program CI costs, zero-cost validation for unaffected programs, and the repository's plain and sanitized gates.
This is the implementation and acceptance work associated with #238; retain precise limitations wherever the surrounding native object model still requires an explicit diagnostic.
- Dominant language
- TypeScript
- Stars
- 6.7k
- Forks
- 229
- Avg merge
- 14h 29m
- Merged PRs (30d)
- 787
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vercel-labs/scriptc
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
vercel-labs/scriptc#4865 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
vercel-labs/scriptc#4864 ·
Maintainers usually reply within 1 day
-
Windows ARM64 as a cross-compile targetPossibly taken @hum-n claimed this 1 day ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
vercel-labs/scriptc#4858 ·
Maintainers usually reply within 1 day
-
post-merge-bisect-unresolved
Difficulty 3/5 1-2 days Newbie friendliness 43/100
vercel-labs/scriptc#4791 ·
Maintainers usually reply within 1 day
-
post-merge-bisect-unconfirmed
Difficulty 5/5 Over a week Newbie friendliness 12/100
vercel-labs/scriptc#4755 · 1 comment ·
Maintainers usually reply within 1 day
All issues in vercel-labs/scriptc
Similar issues
-
bug data-types
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/clickhouse-js#1293 ·
Maintainers usually reply within 1 day
-
area: middleware enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
agent/quality testing
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
juspay/agent-distro#203 ·
Maintainers usually reply within 1 day