From 8385548b331897727422925322390f12bd4f5226 Mon Sep 17 00:00:00 2001 From: Daniel Fischer Date: Sun, 19 Apr 2020 12:12:17 +0200 Subject: [PATCH 1/5] add named export --- klona.d.ts | 4 +++- src/index.js | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) mode change 100644 => 100755 klona.d.ts mode change 100644 => 100755 src/index.js diff --git a/klona.d.ts b/klona.d.ts old mode 100644 new mode 100755 index ef82ab0..dee0066 --- a/klona.d.ts +++ b/klona.d.ts @@ -1 +1,3 @@ -export default function(val: T): T; +declare function klona(val: T): T +export default klona; +export { klona }; diff --git a/src/index.js b/src/index.js old mode 100644 new mode 100755 index d4f5435..4f64846 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,4 @@ -export default function klona(x) { +function klona(x) { if (typeof x !== 'object') return x; var k, tmp, str=Object.prototype.toString.call(x); @@ -60,3 +60,6 @@ export default function klona(x) { return x; } + +export default klona; +export { klona }; From cd7678f3360db7e53b74eac05a9d28123d891bff Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Mon, 10 Aug 2020 16:17:14 -0700 Subject: [PATCH 2/5] break: export named function --- src/index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index 4f64846..1848614 100755 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,4 @@ -function klona(x) { +export function klona(x) { if (typeof x !== 'object') return x; var k, tmp, str=Object.prototype.toString.call(x); @@ -60,6 +60,3 @@ function klona(x) { return x; } - -export default klona; -export { klona }; From b232e02982205cf91f70a4890dfded6242664fb0 Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Mon, 10 Aug 2020 16:17:37 -0700 Subject: [PATCH 3/5] break(types): export named function --- klona.d.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/klona.d.ts b/klona.d.ts index dee0066..6ecbf72 100755 --- a/klona.d.ts +++ b/klona.d.ts @@ -1,3 +1 @@ -declare function klona(val: T): T -export default klona; -export { klona }; +export function klona(val: T): T From b3a080333ef478f2888c53f98dbf734be9d9427b Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Mon, 10 Aug 2020 16:25:51 -0700 Subject: [PATCH 4/5] chore: remove `kleur.d.ts` file --- klona.d.ts | 1 - 1 file changed, 1 deletion(-) delete mode 100755 klona.d.ts diff --git a/klona.d.ts b/klona.d.ts deleted file mode 100755 index 6ecbf72..0000000 --- a/klona.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function klona(val: T): T From cd98d80e5125ca293adc1881310280f993200316 Mon Sep 17 00:00:00 2001 From: Daniel Fischer Date: Tue, 11 Aug 2020 23:28:03 +0200 Subject: [PATCH 5/5] fix(merge): put back proper type definition --- index.d.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/index.d.ts b/index.d.ts index c1557c5..8c0fca5 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1 @@ -declare module 'klona' { - function klona(val: T): T; - export = klona; -} +export function klona(input: T): T;