Skip to content

Commit

Permalink
fix: update typescript definition file to contain replaceAll() (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tal500 committed Sep 30, 2022
1 parent 226d381 commit 45a4921
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.d.ts
Expand Up @@ -208,6 +208,10 @@ export default class MagicString {
* String replacement with RegExp or string.
*/
replace(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): MagicString;
/**
* Same as `s.replace`, but replace all matched strings instead of just one.
*/
replaceAll(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): MagicString;

lastChar(): string;
lastLine(): string;
Expand Down

0 comments on commit 45a4921

Please sign in to comment.