Include and publish TypeScript definitions (#3370)

Definitions are a snapshot taken from `@types/sharp`,
which remain under the terms of MIT licensing.
This commit is contained in:
Espen Hovlandsdal
2023-01-16 02:48:37 -08:00
committed by GitHub
parent 286a322622
commit aa5f0f4e40
5 changed files with 2217 additions and 2 deletions

View File

@@ -33,6 +33,7 @@ To test C++ changes, you can compile the module using `npm install --build-from-
Please add JavaScript [unit tests](https://github.com/lovell/sharp/tree/main/test/unit) to cover your new feature.
A test coverage report for the JavaScript code is generated in the `coverage/lcov-report` directory.
Please also update the [TypeScript definitions](https://github.com/lovell/sharp/tree/main/lib/index.d.ts), along with the [type definition tests](https://github.com/lovell/sharp/tree/main/test/types/sharp.test-d.ts).
Where possible, the functional tests use gradient-based perceptual hashes
based on [dHash](http://www.hackerfactor.com/blog/index.php?/archives/529-Kind-of-Like-That.html)