Skip to content

Commit 483d8bf

Browse files
committed
fix: effect typefusion script types export
1 parent 8651fbc commit 483d8bf

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

.changeset/tasty-years-relate.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"typefusion": patch
3+
---
4+
5+
export Effect types from Effect module

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ For detailed API documentation, visit the [reference docs](https://aniravi24.git
196196

197197
## Effect Integration
198198

199-
Typefusion is built with [Effect](https://effect.website). Refer to the reference docs for details on Effect-suffixed functions and their usage. Most of the time, you just need to suffix the types and functions with `Effect` to use them. For example, `typefusionRef` becomes `typefusionRefEffect`, `TypefusionDbScript` becomes `TypefusionDbScriptEffect`, and `run` becomes `runEffect`.
199+
Typefusion is built with [Effect](https://effect.website). Refer to the reference docs for details on Effect-suffixed functions and their usage. Most of the time, you just need to suffix the types and functions with `Effect` to use them. For example, `typefusionRef` becomes `typefusionRefEffect`, `TypefusionDbScript` becomes `TypefusionDbScriptEffect`, and `run` becomes `runEffect`. The `typefusion` library export is `typefusionEffect`.
200200

201201
## Troubleshooting
202202

packages/typefusion/example/main_effect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Effect } from "effect";
22
import { pgType } from "../src/db/postgres/types.js";
3-
import { TypefusionDbScriptEffect } from "../src/store.js";
3+
import { TypefusionDbScriptEffect } from "../src/effect.js";
44

55
export const mainSchema = {
66
id: pgType.integer().notNull(),

packages/typefusion/example/postgres/typefusion_effect_ref.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { Effect } from "effect";
22
import { pgType } from "../../src/index.js";
33
import { typefusionRefEffect } from "../../src/lib.js";
4-
import { TypefusionDbScriptEffect } from "../../src/store.js";
4+
import { TypefusionDbScriptEffect } from "../../src/effect.js";
55
import mainEffect from "../main_effect.js";
6+
67
const smallSchema = {
78
small: pgType.text().notNull(),
89
};

packages/typefusion/src/effect.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ import { typefusion } from "./typefusion.js";
22

33
export { typefusionRefEffect, typefusionRefTableNameEffect } from "./lib.js";
44

5-
export { typefusion };
5+
export {
6+
TypefusionScriptEffect,
7+
TypefusionDbScriptEffect,
8+
TypefusionScriptUnknownEffect,
9+
TypefusionScriptDataOnlyEffect,
10+
TypefusionDbScriptDataUnknownEffect,
11+
} from "./store.js";
12+
13+
export { typefusion as typefusionEffect };
614

715
export default typefusion;

0 commit comments

Comments
 (0)