From cb5dcde93f4ffcdc6d487910234db298f4907130 Mon Sep 17 00:00:00 2001 From: zak Date: Fri, 20 Oct 2023 13:03:13 +0100 Subject: [PATCH] Remove async from ModelsClient.models.get function --- src/ModelsClient.test.ts | 4 ++-- src/ModelsClient.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ModelsClient.test.ts b/src/ModelsClient.test.ts index 10366039..068181d5 100644 --- a/src/ModelsClient.test.ts +++ b/src/ModelsClient.test.ts @@ -33,7 +33,7 @@ describe('Models', () => { channelName, }) => { const modelsClient = new ModelsClient({ ably }); - const model1 = await modelsClient.models.get({ + const model1 = modelsClient.models.get({ name: 'test', channelName: channelName, $sync: async () => 'initial data', @@ -41,7 +41,7 @@ describe('Models', () => { }); expect(model1.name).toEqual('test'); - const model2 = await modelsClient.models.get({ + const model2 = modelsClient.models.get({ name: 'test', channelName: channelName, $sync: async () => 'initial data', diff --git a/src/ModelsClient.ts b/src/ModelsClient.ts index 9c9a52b2..81e1f340 100644 --- a/src/ModelsClient.ts +++ b/src/ModelsClient.ts @@ -45,7 +45,7 @@ export default class ModelsClient { * The names and funcitons will be automatically setup on the model returned. * The model will not start until you call model.sync() */ - get: async (registration: registration) => { + get: (registration: registration) => { const name = registration.name; const channelName = registration.channelName;