Skip to content

Commit abfd9a9

Browse files
author
Sergei Orlov
authored
Merge pull request #4 from Raini-js/dev
fix: default export now works properly
2 parents 666ee4f + 678dd21 commit abfd9a9

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1+
import { Switch } from "./src";
2+
13
export * from "./src";
4+
5+
/**
6+
* Pointer interface for lifting value provided as an argument to Switch.
7+
*/
8+
export default function<T, K>(x: T) {
9+
return Switch.for<T, K>(x);
10+
}

src/index.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
import { Switch } from "./Switch";
2-
31
export * from "./ISwitch";
42
export * from "./Switch";
53
export * from "./TKnown";
64
export * from "./TPredicateFunction";
7-
8-
/**
9-
* Pointer interface for lifting value provided as an argument to Switch.
10-
*/
11-
export default function<T, K>(x: T) {
12-
return Switch.for<T, K>(x);
13-
}

tests/Switch.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import match, { Switch } from "../src";
1+
import { Switch } from "../src";
2+
import match from "../";
23

34
describe("Switch", () => {
45
it("should exist", () => {

0 commit comments

Comments
 (0)