Frontend rejects decorators with `SC0001: Decorators are not valid here.`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- compilers
調査の方向性
まず @scriptc/compiler 0.0.35 を使って最小限の TypeScript 例を再現し、experimentalDecorators と emitDecoratorMetadata を使用した tsc との動作を比較します。コンストラクターパラメーターのデコレーターに対して SC0001 を出力するコンパイラーパスを追跡します。サポート対象のクラス、メソッド、プロパティ、アクセサー、パラメーターのデコレーターが必要なランタイムメタデータ付きでコンパイルされるか、サポート範囲外である場合はその制限が文書化されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
scriptc rejects decorator syntax with SC0001: Decorators are not valid here. instead of compiling it. This makes it impossible to build any codebase that relies on decorators — including NestJS apps, which use them pervasively for dependency injection, controllers, providers, and parameter injection.
In the case below, a standard NestJS constructor parameter decorator (@InjectPinoLogger from nestjs-pino) is rejected, even though it is valid TypeScript and compiles fine with tsc.
Minimal Demo
import { Injectable } from "@nestjs/common";
import { InjectPinoLogger, PinoLogger } from "nestjs-pino";
@Injectable()
export class FileValidationService {
constructor(
@InjectPinoLogger(FileValidationService.name)
private readonly logger: PinoLogger,
) {}
}
Output
src/server/shared/modules/filesystem/file-validation.service.ts:31:5 - error SC0001: Decorators are not valid here.
30 | constructor(
31 | @InjectPinoLogger(FileValidationService.name)
| ^
32 | private readonly logger: PinoLogger,
Expected
Decorators should be supported (class, method, property, accessor, and parameter decorators), compiling to their equivalent runtime form and preserving metadata — matching TS experimentalDecorators + emitDecoratorMetadata semantics that frameworks like NestJS depend on.
If full decorator support is out of scope, the limitation should be clearly documented, since SC0001 currently blocks entire categories of TypeScript projects.
Environment
@scriptc/compilerversion: 0.0.35- OS: MacOS
Notes
This same file compiles without errors under tsc with experimentalDecorators and emitDecoratorMetadata enabled.
- 主要言語
- TypeScript
- スター
- 6.7k
- フォーク
- 229
- 平均マージ
- 14時間 29分
- マージ済み PR(30日)
- 787
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
vercel-labs/scriptc のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
vercel-labs/scriptc#4865 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
vercel-labs/scriptc#4864 ·
メンテナーはふだん 1 日以内に返信
-
Windows ARM64 as a cross-compile target対応中かも @hum-n が 1 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
vercel-labs/scriptc#4858 ·
メンテナーはふだん 1 日以内に返信
-
post-merge-bisect-unresolved
難易度 3/5 1〜2日 初心者へのやさしさ 43/100
vercel-labs/scriptc#4791 ·
メンテナーはふだん 1 日以内に返信
-
post-merge-bisect-unconfirmed
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
vercel-labs/scriptc#4755 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
vercel-labs/scriptc の issue をすべて見る
似ている issue
-
bug data-types
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
ClickHouse/clickhouse-js#1293 ·
メンテナーはふだん 1 日以内に返信
-
area: middleware enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
agent/quality testing
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
juspay/agent-distro#203 ·
メンテナーはふだん 1 日以内に返信