Skip to content

Commit 5bf0f83

Browse files
committed
chore: add index.d.ts
1 parent cb53854 commit 5bf0f83

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* description: JavaScript's String.indexOf() that allows for regular expressions.
44
* homepage: https://github.com/afeiship/next-regex-index-of
55
* version: 1.0.0
6-
* date: 2020-11-23 10:08:26
6+
* date: 2020-11-23 10:22:16
77
* license: MIT
88
*/
99

dist/index.min.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* description: JavaScript's String.indexOf() that allows for regular expressions.
44
* homepage: https://github.com/afeiship/next-regex-index-of
55
* version: 1.0.0
6-
* date: 2020-11-23 10:08:26
6+
* date: 2020-11-23 10:22:16
77
* license: MIT
88
*/
99
!function(){var e=(this||window||Function("return this")()).nx||require("@jswork/next");e.regexIndexOf=function(e,n,r){if(!e)return-1;r=r||0,n=e.substring(r).search(n);return 0<=n?n+r:n},"undefined"!=typeof module&&module.exports&&(module.exports=e.regexIndexOf)}();

index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export namespace nx {
2+
export function regexIndexOf(string: string, regex: RegExp, startpos?: number): number;
3+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"release": "release-it"
1515
},
1616
"main": "dist/index.js",
17+
"types": "index.d.ts",
1718
"license": "MIT",
1819
"devDependencies": {
1920
"@jswork/gulp-pkg-header": "^1.0.2",
@@ -45,4 +46,4 @@
4546
"index",
4647
"search"
4748
]
48-
}
49+
}

0 commit comments

Comments
 (0)