From 71f841505526615f3063fc5c36ca1d4cb179a724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ant=C3=B4nio=20Posso=20da=20Silva?= Date: Wed, 19 Aug 2020 01:13:57 -0300 Subject: [PATCH] fix(types): handle multi-module definitions correctly (#22) * Fix typing. * chore: remove manual copies * chore: use postbuild script Co-authored-by: Luke Edwards --- index.d.ts | 16 +--------------- package.json | 1 + 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/index.d.ts b/index.d.ts index e161f3e..e577809 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,15 +1 @@ -declare module 'klona' { - export function klona(input: T): T; -} - -declare module 'klona/lite' { - export function klona(input: T): T; -} - -declare module 'klona/json' { - export function klona(input: T): T; -} - -declare module 'klona/full' { - export function klona(input: T): T; -} +export function klona(input: T): T; \ No newline at end of file diff --git a/package.json b/package.json index 2fd7b45..e511adc 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "scripts": { "build": "bundt", "pretest": "npm run build", + "postbuild": "echo \"lite full json\" | xargs -n1 cp -v index.d.ts", "test": "uvu -r esm test -i suites" }, "keywords": [