General-purpose utility types/type guards (maybe in a new `types` package scope)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- typescript
調査の方向性
まず collections/deep-merge にある既存の ExpandRecursively ユーティリティを確認し、提案されている NonEmptyArray 型ガードと比較します。新しい @std/types パッケージスコープが適切かどうかを調査し、どのユーティリティをそこに含めるべきか、また代替となる型表現がどのように異なるかを確認します。パッケージスコープと API セットについて合意し、関連するユーティリティが指定されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
There are various common utility types that aren't available in TypeScript's built-in libraries. For example:
export type NonEmptyArray<T> = [T, ...T[]]
export function isNonEmptyArray<T>(arr: T[]): arr is NonEmptyArray<T> {
return arr.length > 0
}
In some cases, these can be somewhat complex, in others (like NonEmptyArray) implementation is somewhat trivial, but also involves design decisions where the tradeoffs may not be initially obvious — for example, what if anything is the practical difference between [T, ...T[]] vs T[] & { 0: T }?
Describe the solution you'd like
Maybe a new @std/types package scope? That would be the first place I'd look for this kind of thing.
The only existing examples I know of in std are ExpandRecursively under collections/deep-merge, but there may be a few more.
Describe alternatives you've considered
Include type utils distributed in various other packages, but that's likely to be less discoverable — I only stumbled upon ExpandRecursively by accident after re-implementing similar logic multiple times.
- 主要言語
- TypeScript
- スター
- 3.6k
- フォーク
- 713
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
denoland/std のほかの issue
-
`assertEquals` throws on structurally equal `Error` objects due to different stack trace対応中かも @powerman2026 が 1 日前に担当しました。 オープンbug needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
streams: DelimiterStream leaves delimiter bytes in the output when the delimiter spans more than two chunks対応中かも @helmipradita が 15 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
@std/encoding: decodeAscii85 corrupts delimited data ending in "<", decodeVarint32 reads past the end of the buffer対応中かも @helmipradita が 16 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
@std/yaml: stringify() with condenseFlow wraps already quoted keys in a second pair of quotes対応中かも @sebxt が 35 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
@std/ini parse silently drops an entire section when the section name repeats対応中かも @Harsh23Kashyap が 35 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
security: set top-level least-privilege permissions in five workflows対応中かも @JonathanTSilva が今日担当しました。 オープンpriority: p2 size: xs type: security
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
JonathanTSilva/jts-website#150 ·
メンテナーはふだん 1 日以内に返信
-
bug Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
scottbenton/Iron-Link#437 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
speakeasy-api/speakeasy#2159 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
vercel-labs/ui#1066 ·
メンテナーはふだん 1 日以内に返信