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
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
@@ -127,7 +129,7 @@ const result = await pb.collection('posts').getOne<typeof typeObj>(optionsObj);
127
129
It's a bit hacky and not very pretty, but does the job.
128
130
129
131
130
-
### Parameter type for `optionBuilder`:
132
+
### Parameter type for the option builder:
131
133
```ts
132
134
{
133
135
// Table name as defined in "Schema"
@@ -152,7 +154,6 @@ ExpandItem {
152
154
fields?:// same as above
153
155
expand?:// same as above
154
156
}
155
-
156
157
```
157
158
158
159
@@ -161,7 +162,7 @@ ExpandItem {
161
162
You might run into a situation where you have a component that requires a specific set of fields to be passed to it, and it makes sense to fetch the item directly in one route, but in another, it makes sense to do so through `expand`.
162
163
163
164
164
-
Because of the way the argument for the option builder is structured, the `fields` array is portable.
165
+
Because of the way the parameter for the option builder is structured, the `fields` array is portable.
165
166
You can define the fields in one place, and use it either at the top level, or in the `expand` option **as is** .
- This way, you can start using this in existing projects without having to change anything. I think most of the time, you don't need to pass in any options to the SDK, so installing a new custom SDK for a very few instances where you need to seems like an overkill.
226
271
- There are many functionalities of the official SDK that I don't use or understand fully, and I don't want to maintain a fork of it just for this.
0 commit comments