String.split() method's separator argument should allow undefined
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- javascript, typescript
- 領域
- tooling
調査の方向性
リンク先のECMAScript仕様に照らしてString.splitの宣言を確認し、separator引数と提示されたサンプルに焦点を当てます。TypeScript定義がundefinedを受け入れ、別のコードパスを必要とせずにサンプルの型チェックが通れば完了です。
索引モデルが issue の本文から書いたものです。
説明
⚙ Compilation target
ES2024
⚙ Library
6.0.2
Missing / Incorrect Definition
String.split should allow undefined as its separator argument, resulting in an array containing the entire string.
Unlike the case of omitting the separator (#38331), this is a useful feature, since separator may be a variable, and it can be desirable to get an array with the entire string in the case that separator is not set, in order to not need a different code path for this case.
This feature is explicitly defined in the spec. It is not something that just 'happens to work', like using null or a number.
Sample Code
console.log("string,that could/split:but-should;not".split(undefined));
Documentation Link
https://tc39.es/ecma262/multipage/text-processing.html#sec-string.prototype.split
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 106
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/TypeScript のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
microsoft/TypeScript#64322 · コメント 2 件 · リアクション 1 件 · 担当者 2 名 ·
-
Possible Improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/TypeScript#64278 · コメント 1 件 · リアクション 1 件 ·
-
Docs
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
microsoft/TypeScript#64118 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
microsoft/TypeScript#64094 ·
-
Docs
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microsoft/TypeScript#63959 · コメント 5 件 ·
microsoft/TypeScript の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
-
enhancement needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
kind/cleanup
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
kubernetes-sigs/kueue#15947 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
sympozium-ai/sympozium#627 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100