Short description
Detailed description
Example
Before
tsMeteor.methods({ a() { const doc = MyCollection.findOne({ _id: '12' }); }, });
After
tsMeteor.methods({ async a() { const doc = await MyCollection.findOneAsync({ _id: '12' }); }, });
,
Before
tsMeteor.methods({ anotherMethod() { const user = Meteor.users.findOne({ username: 'john_doe' }); }, });
After
tsMeteor.methods({ async anotherMethod() { const user = await Meteor.users.findOneAsync({ username: 'john_doe' }); }, });
,
Before
tsMeteor.methods({ getUserProfile() { const profile = Profiles.findOne({ userId: 'abc123' }); }, });
After
tsMeteor.methods({ async getUserProfile() { const profile = await Profiles.findOneAsync({ userId: 'abc123' }); }, });