Skip to content

Commit 257359a

Browse files
committed
Add TypeScript declaration file
1 parent 94e7527 commit 257359a

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# All unnecessary
22
*
3+
4+
# But not
5+
!index.d.ts

index.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* Checks for the presence of URL protocol without a slashes (colon-slash-slash)
3+
*
4+
* @param str - string for check
5+
*
6+
* @returns true if it is a URL and protocol without slashes
7+
*/
8+
declare const isUrlProtocolWithoutSlashes: (str: string) => Boolean;
9+
export default isUrlProtocolWithoutSlashes;

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.3",
44
"description": "Checks for the presence of URL protocol without a slashes (colon-slash-slash)",
55
"main": "index.js",
6+
"types": "index.d.ts",
67
"sideEffects": false,
78
"scripts": {
89
"lint": "eslint .",

0 commit comments

Comments
 (0)