Skip to content

Commit

Permalink
Add TypeScript definition (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
nix6839 committed Mar 12, 2024
1 parent bc57478 commit a0dec65
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions index.d.ts
@@ -0,0 +1,7 @@
/**
Check if a string is HTML.
@param string - The string to check if it is HTML.
@returns `true` if the string is HTML, `false` otherwise.
*/
export default function isHtml(string: string): boolean;
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -12,14 +12,16 @@
},
"type": "module",
"exports": "./index.js",
"types": "./index.d.ts",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
"index.js",
"index.d.ts"
],
"keywords": [
"html",
Expand Down

0 comments on commit a0dec65

Please sign in to comment.