microsoft / microsoft/TypeScript
Add types for `String.{matchAll,replaceAll}` with a well known symbol
@rbuckton がすでに取り組んでいます。
2025年3月20日 から。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
### ⚙ Compilation target
es2022
### ⚙ Library
ES2023
### Missing / Incorrect Definition
Definitions for `String.{matchAll,replaceAll}` with an object that implements `[Symbol.matchAll]`/`[Symbol.replace]`, rather than a pure RegExp.
### Sample Code
```TypeScript
const someObjectThatImplementsTheSymbols = ...; // e.g. https://github.com/segevfiner/node-pcre2
"foo".matchAll(someObjectThatImplementsTheSymbols);
"foo".replaceAll(someObjectThatImplementsTheSymbols, "bar");
```
### Documentation Link
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/matchAll
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。