From f79760b4f249f4a15a6f05619cc2e9040ec4c003 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Mon, 16 Jan 2023 11:12:00 +0000 Subject: [PATCH] Docs: changelog and help for TypeScript defs #3369 #3370 --- docs/changelog.md | 3 +++ docs/install.md | 11 +++++++++++ lib/index.d.ts | 1 + package.json | 2 +- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index 40ae1531..ebe88344 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -19,6 +19,9 @@ Requires libvips v8.14.0 * Allow use of GPS (IFD3) EXIF metadata. [#2767](https://github.com/lovell/sharp/issues/2767) +* TypeScript definitions are now maintained and published directly, deprecating the `@types/sharp` package. + [#3369](https://github.com/lovell/sharp/issues/3369) + * Prebuilt binaries: ensure macOS 10.13+ support, as documented. [#3438](https://github.com/lovell/sharp/issues/3438) diff --git a/docs/install.md b/docs/install.md index 99de5df3..a1475e6b 100644 --- a/docs/install.md +++ b/docs/install.md @@ -302,6 +302,17 @@ custom: - npm install --arch=x64 --platform=linux sharp ``` +## TypeScript + +TypeScript definitions are published as part of +the `sharp` package from v0.32.0. + +Previously these were available via the `@types/sharp` package, +which is now deprecated. + +When using Typescript, please ensure `devDependencies` includes +the `@types/node` package. + ## Fonts When creating text images or rendering SVG images that contain text elements, diff --git a/lib/index.d.ts b/lib/index.d.ts index 07e23f81..31104203 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,5 +1,6 @@ /** * Type definitions originally lifted from `@types/sharp`, MIT-licensed. + * https://opensource.org/licenses/MIT * * Original definition authors: * - Wooseop Kim diff --git a/package.json b/package.json index fbf989c5..8b98145e 100644 --- a/package.json +++ b/package.json @@ -155,7 +155,7 @@ "prebuild": "^11.0.4", "rimraf": "^3.0.2", "semistandard": "^16.0.1", - "tsd": "^0.24.1" + "tsd": "^0.25.0" }, "license": "Apache-2.0", "config": {