From 6cf5ce9e63340dff036fc410800c71c553eb1b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Posso?= Date: Tue, 18 Aug 2020 23:25:38 -0300 Subject: [PATCH 1/3] Fix typing. --- full.d.ts | 1 + index.d.ts | 16 +--------------- json.d.ts | 1 + lite.d.ts | 1 + 4 files changed, 4 insertions(+), 15 deletions(-) create mode 100644 full.d.ts create mode 100644 json.d.ts create mode 100644 lite.d.ts diff --git a/full.d.ts b/full.d.ts new file mode 100644 index 0000000..e577809 --- /dev/null +++ b/full.d.ts @@ -0,0 +1 @@ +export function klona(input: T): T; \ No newline at end of file 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/json.d.ts b/json.d.ts new file mode 100644 index 0000000..e577809 --- /dev/null +++ b/json.d.ts @@ -0,0 +1 @@ +export function klona(input: T): T; \ No newline at end of file diff --git a/lite.d.ts b/lite.d.ts new file mode 100644 index 0000000..e577809 --- /dev/null +++ b/lite.d.ts @@ -0,0 +1 @@ +export function klona(input: T): T; \ No newline at end of file From dc9b6b0669c7ac699ec8cabe96d39cd5aef133be Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Tue, 18 Aug 2020 21:08:13 -0700 Subject: [PATCH 2/3] chore: remove manual copies --- full.d.ts | 1 - json.d.ts | 1 - lite.d.ts | 1 - 3 files changed, 3 deletions(-) delete mode 100644 full.d.ts delete mode 100644 json.d.ts delete mode 100644 lite.d.ts diff --git a/full.d.ts b/full.d.ts deleted file mode 100644 index e577809..0000000 --- a/full.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function klona(input: T): T; \ No newline at end of file diff --git a/json.d.ts b/json.d.ts deleted file mode 100644 index e577809..0000000 --- a/json.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function klona(input: T): T; \ No newline at end of file diff --git a/lite.d.ts b/lite.d.ts deleted file mode 100644 index e577809..0000000 --- a/lite.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function klona(input: T): T; \ No newline at end of file From 52a5332f8dc73acaf7e72f3149b31c16a8858722 Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Tue, 18 Aug 2020 21:08:40 -0700 Subject: [PATCH 3/3] chore: use postbuild script --- package.json | 1 + 1 file changed, 1 insertion(+) 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": [