Skip to content

Commit f9c6ae3

Browse files
committed
Fix types of replace function
1 parent 21e09e8 commit f9c6ae3

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Diff for: index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
/**
3030
* @callback ReplaceFunction
31-
* @param {...unknown} parameters
31+
* @param {...any} parameters
3232
* @returns {Array.<PhrasingContent>|PhrasingContent|string|false|undefined|null}
3333
*/
3434

Diff for: package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@
8080
"typeCoverage": {
8181
"atLeast": 100,
8282
"detail": true,
83-
"strict": true
83+
"strict": true,
84+
"ignoreFiles": [
85+
"index.d.ts"
86+
]
8487
}
8588
}

Diff for: test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ test('findAndReplace', function (t) {
4444
findAndReplace(
4545
create(),
4646
/em(\w+)is/,
47-
function (_, /** @type {string} */ $1) {
47+
function (/** @type {string} */ _, /** @type {string} */ $1) {
4848
return '[' + $1 + ']'
4949
}
5050
),

0 commit comments

Comments
 (0)