Skip to content

Commit

Permalink
Remove async from ModelsClient.models.get function
Browse files Browse the repository at this point in the history
  • Loading branch information
zknill committed Oct 20, 2023
1 parent 0a57853 commit cb5dcde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ModelsClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ describe('Models', () => {
channelName,
}) => {
const modelsClient = new ModelsClient({ ably });
const model1 = await modelsClient.models.get<string>({
const model1 = modelsClient.models.get<string>({
name: 'test',
channelName: channelName,
$sync: async () => 'initial data',
$merge: async () => 'merged',
});
expect(model1.name).toEqual('test');

const model2 = await modelsClient.models.get<string>({
const model2 = modelsClient.models.get<string>({
name: 'test',
channelName: channelName,
$sync: async () => 'initial data',
Expand Down
2 changes: 1 addition & 1 deletion src/ModelsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <T>(registration: registration<T>) => {
get: <T>(registration: registration<T>) => {
const name = registration.name;
const channelName = registration.channelName;

Expand Down

0 comments on commit cb5dcde

Please sign in to comment.