You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -196,7 +196,7 @@ For detailed API documentation, visit the [reference docs](https://aniravi24.git
196
196
197
197
## Effect Integration
198
198
199
-
Typefusion is built with [Effect](https://effect.website). Refer to the reference docs for details on Effect-suffixed functions and their usage.
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 type of a Typefusion script export ({@link TypefusionScriptExport}) when the result of the `runEffect` function contains the data without any schema.
* The type of a Typefusion script export ({@link TypefusionScriptExport}) when the result of the `run` function contains both the 'schema' and return data
74
99
* you want to use your existing {@link PgType} or {@link MySqlType} schema.
* The type of a Typefusion script export ({@link TypefusionScriptExport}) when the result of the `runEffect` function contains both the 'schema' and return data
113
+
* you want to use your existing {@link PgType} or {@link MySqlType} schema.
[keyinkeyofT]: T[key]extendsDbType<infer U> ? U : never;
122
+
}>,
123
+
any,
124
+
R
125
+
>;
126
+
}
127
+
86
128
/**
87
129
* The type of a Typefusion script export ({@link TypefusionScriptExport}) when the result of the `run` function contains both the 'schema' and return data
88
130
* you want to use your existing {@link PgType} or {@link MySqlType} schema.
* The type of a Typefusion script export ({@link TypefusionScriptExport}) when the result of the `runEffect` function contains both the 'schema' and return data
142
+
* you want to use your existing {@link PgType} or {@link MySqlType} schema.
143
+
* However, the data is unknown, so you can pass in any data array and it will type check.
* The type of a Typefusion script export ({@link TypefusionScriptExport}) when the result of the `run` function contains both the 'schema' and return data.
99
158
* This will check that your `pgType` schema matches the data you are returning, but it's more verbose than using {@link TypefusionDbScript}.
* The type of a Typefusion script export ({@link TypefusionScriptExport}) when the result of the `runEffect` function contains both the 'schema' and return data.
171
+
* This will check that your `pgType` schema matches the data you are returning, but it's more verbose than using {@link TypefusionDbScript}.
* The type of a Typefusion script export ({@link TypefusionScriptExport}) when the result of the `run` function contains potentially only the return data.
112
188
* However, the data is unknown, so you can pass in any data array and it will type check.
113
189
*/
114
190
exportinterfaceTypefusionScriptUnknown
115
191
extendsTypefusionScript<Record<string,unknown>>{}
116
192
193
+
/**
194
+
* The type of a Typefusion script export ({@link TypefusionScriptExport}) when the result of the `runEffect` function contains potentially only the return data.
195
+
* However, the data is unknown, so you can pass in any data array and it will type check.
0 commit comments