From 5e97ec2232202d0a775aff64536975a3f4f9d646 Mon Sep 17 00:00:00 2001 From: Kevin Van Lierde Date: Sat, 6 Aug 2022 00:40:38 +0200 Subject: [PATCH] Add Typescript types & option JSdocs --- package.json | 3 ++- src/index.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 0444c70..295871f 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "lib", "CHANGELOG.md" ], + "types": "lib/types.d.ts", "scripts": { "changelog": "auto-changelog -u --starting-version v1.1.1 --commit-limit false --ignore-commit-pattern '(dev|ci|chore|Release|Merge)'", "coverage": "nyc report --reporter=text-lcov > ./coverage.info", @@ -53,7 +54,7 @@ "lint": "eslint --fix .", "lint:check": "eslint --fix-dry-run .", "release": "release-it .", - "build": "microbundle --target node --no-sourcemap -f cjs,esm --strict", + "build": "microbundle --target node --no-sourcemap -f cjs,esm --strict --types", "pretest": "npm run build", "test": "nyc mocha" }, diff --git a/src/index.js b/src/index.js index a7a331f..467885d 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,7 @@ /** * @typedef {Object} Options - * @property {Boolean} [default=false] - * @property {Boolean} [include=true] + * @property {Boolean} [default=false] Consider files without `draft` key drafts. Defaults to `false`. + * @property {Boolean} [include=false] Include drafts in the build output. Defaults to `false`. */ const defaultOptions = {