diff --git a/README.md b/README.md index 9800c70c..f80480c4 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ async function updatePost(mutationId: string, content: string) { } // create a new model instance called 'post' by passing the sync and merge functions -const model = await modelsClient.models.get({ +const model = modelsClient.models.get({ name: 'post', channelName: 'models:posts', $sync: sync, diff --git a/docs/concepts/usage.md b/docs/concepts/usage.md index 9ad6222c..32a14dab 100644 --- a/docs/concepts/usage.md +++ b/docs/concepts/usage.md @@ -29,7 +29,7 @@ Note that we pass in the shape of our data model (`Post`) as a type parameter. In order to instantiate the model, we need to pass some *registrations* which link up the model to your application code. ```ts -const model = await modelsClient.models.get({ +const model = modelsClient.models.get({ name: /* ... */, channelName: /* ... */, $sync: /* ... */, @@ -58,7 +58,7 @@ async function sync() { return result.json(); } -const model = await modelsClient.models.get({ +const model = modelsClient.models.get({ $sync: /* ... */, /* other registrations */ })