microsoft / microsoft/TypeScript
Add types for `String.{matchAll,replaceAll}` with a well known symbol
@rbuckton ya está trabajando en esto.
Desde el 20/3/2025.
- Lenguaje dominante
- Go
- Estrellas
- 111k
- Forks
- 14.3k
- Merge medio
- 2 d 4 h
- PR fusionados (30 d)
- 132
Descripción
### ⚙ 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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Evaluación
Este issue todavía no se ha evaluado.