Skip to content

Commit 45a4921

Browse files
authoredSep 30, 2022
fix: update typescript definition file to contain replaceAll() (#224)
1 parent 226d381 commit 45a4921

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎index.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ export default class MagicString {
208208
* String replacement with RegExp or string.
209209
*/
210210
replace(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): MagicString;
211+
/**
212+
* Same as `s.replace`, but replace all matched strings instead of just one.
213+
*/
214+
replaceAll(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): MagicString;
211215

212216
lastChar(): string;
213217
lastLine(): string;

0 commit comments

Comments
 (0)
Please sign in to comment.