diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..42d955b --- /dev/null +++ b/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; diff --git a/package.json b/package.json index 8b68f4e..e11a68f 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ }, "type": "module", "exports": "./index.js", + "types": "./index.d.ts", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -19,7 +20,8 @@ "test": "xo && ava" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "keywords": [ "html",