From 678dd212e9bce2885cc26a4700c6bc3363f9eb2e Mon Sep 17 00:00:00 2001 From: Sergei Orlov Date: Mon, 2 Dec 2019 22:45:35 +0300 Subject: [PATCH] fix: default export now works properly --- index.ts | 9 +++++++++ src/index.ts | 9 --------- tests/Switch.spec.ts | 3 ++- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/index.ts b/index.ts index 3bd16e1..d6d3026 100644 --- a/index.ts +++ b/index.ts @@ -1 +1,10 @@ +import { Switch } from "./src"; + export * from "./src"; + +/** + * Pointer interface for lifting value provided as an argument to Switch. + */ +export default function(x: T) { + return Switch.for(x); +} diff --git a/src/index.ts b/src/index.ts index c55452a..c852174 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,13 +1,4 @@ -import { Switch } from "./Switch"; - export * from "./ISwitch"; export * from "./Switch"; export * from "./TKnown"; export * from "./TPredicateFunction"; - -/** - * Pointer interface for lifting value provided as an argument to Switch. - */ -export default function(x: T) { - return Switch.for(x); -} diff --git a/tests/Switch.spec.ts b/tests/Switch.spec.ts index 2e78510..3cb66ee 100644 --- a/tests/Switch.spec.ts +++ b/tests/Switch.spec.ts @@ -1,4 +1,5 @@ -import match, { Switch } from "../src"; +import { Switch } from "../src"; +import match from "../"; describe("Switch", () => { it("should exist", () => {