fix(dts): `ngAcceptInputType_*` types drop some comments ngtsc keeps
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- angular, rust, typescript
- 領域
- compilers
調査の方向性
Start in crates/oxc_angular_compiler/src/directive/dts_type.rs, focusing on leading_comments and same_line_comments. Compare the existing output for repro cases a–g with ngtsc 22.1.7, including U+2028/U+2029 line breaks. Done means the generated .d.ts preserves the same leading and trailing comments as ngtsc while leaving the type unchanged.
索引モデルが issue の本文から書いたものです。
説明
#496 prints the transform's parameter type into .d.ts. It keeps a single-line block comment in front of a list element. ngtsc keeps more than that, and in some U+2028/U+2029 cases prints the comment twice. Only the comments in the .d.ts text differ. The type is the same.
Repro (each line is the parameter type of @Input({transform: (v: <TYPE>) => 1}) a)
| # | <TYPE> in source |
OXC (#504 tip) | ngtsc 22.1.7 |
|---|---|---|---|
| a | string /** doc */ |
string |
string /** doc */ |
| b | string | number /** doc */ |
string | number |
string | number /** doc */ |
| c | \n /** doc */\n string (comment on its own line) |
string |
\n /** doc */\n string |
| d | string | /* a\n b */ number |
string | number |
string | /* a\n b */ number |
| e | Array</* a\n b */ string> |
Array<string> |
Array</* a\n b */ string> |
| f | Array<
/* c */\nstring | number> |
Array<string | number> |
Array</* c */ /* c */ string | number> |
| g | Array<
/* c */\nstring | number> |
Array<string | number> |
Array</* c */ /* c */ string | number> |
Cases where they already match: Array</* c */ string>, string /* keep */ \| number, /* a\n b */ string (both drop it), string /* a\n b */ (both drop it), and { a: 1; // x
b: ... }.
Full source for case a:
import {Directive, Input} from '@angular/core';
@Directive({selector: '[d]'})
export class D {
@Input({transform: (v: string /** doc */) => 1}) a = 0;
}
Where
crates/oxc_angular_compiler/src/directive/dts_type.rs (added in #496): leading_comments / same_line_comments. Only the comments on the same line in front of a list element are kept. Trailing comments, comments on their own line and comments that span lines are dropped.
On main?
No. Main prints unknown for these fields. This gap comes with #496.
Direction
Copy the rules of TypeScript's emitter for leading and trailing comments on type nodes, including the U+2028/U+2029 line-break cases. Test against ngtsc output.
- 主要言語
- Rust
- スター
- 232
- フォーク
- 21
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 62
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
voidzero-dev/oxc-angular-compiler のほかの issue
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
voidzero-dev/oxc-angular-compiler#505 ·
メンテナーはふだん 1 日以内に返信
-
bug rust
難易度 4/5 3〜5日 初心者へのやさしさ 56/100
voidzero-dev/oxc-angular-compiler#313 ·
メンテナーはふだん 1 日以内に返信
-
Support useDefineForClassFields: false (Class Field Lowering)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
voidzero-dev/oxc-angular-compiler#73 · コメント 11 件 ·
メンテナーはふだん 1 日以内に返信
-
Angular 21.2.0 + @oxc-angular/vite 0.0.7 SSR runtime parity regressions (RouterLinkActive, Forms DI, Apollo DI) require app-level shims再び着手できるかも @Brooooooklyn が 218 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
voidzero-dev/oxc-angular-compiler#61 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Angular 21.2.0 + @oxc-angular/vite 0.0.7 SSR: AngularNodeAppEngine is unusable (missing app-engine manifest)再び着手できるかも @Brooooooklyn が 218 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
voidzero-dev/oxc-angular-compiler#60 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
voidzero-dev/oxc-angular-compiler の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
element-hq/lk-jwt-service#248 ·
メンテナーはふだん 1 日以内に返信
-
agent:triaged bug bughunt pm:pipenv priority:p1
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
SocketDev/socket-patch#1219 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pact-foundation/pact-cli#154 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
antithesishq/bombadil#361 ·
メンテナーはふだん 1 日以内に返信