From 70102777934bdac16fdea79d984ff21f6ea94822 Mon Sep 17 00:00:00 2001 From: Makien Osman <90332566+Osman-Sodefa@users.noreply.github.com> Date: Thu, 17 Mar 2022 18:14:44 +0100 Subject: [PATCH] Add `"types"` to `"exports"` When trying to use `fast-check` with TypeScript where `moduleResolution` is set to `Node12` or `NodeNext` we get the following error: > Could not find a declaration file for module 'fast-check'. '/home/makeen/q2web/Dev/openapi-codegen/node_modules/fast-check/lib/esm/fast-check.js' implicitly has an 'any' type. > Try `npm i --save-dev @types/fast-check` if it exists or add a new declaration (.d.ts) file containing `declare module 'fast-check';`ts(7016) This change fixes the issue. I think this might be related: https://github.com/microsoft/TypeScript/issues/46334 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 7ec97be011b..cbf9fc560c3 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "exports": { ".": { "require": "./lib/fast-check.js", + "types": "./lib/types/fast-check.d.ts", "default": "./lib/esm/fast-check.js" } },