[service-bus] Move peekLock/receiveAndDelete flag into `options`
See original GitHub issueAs part of of our API consistency we want to move the lockmode parameter to be part of the options bag (with the default value being 'peekLock`).
This parameter in the signature is currently used to provide some nice type safety (via Receiver<ReceivedMessageWithLock|ReceivedMessage>
) which should be preserved when we move the parameter.
In addition we just want to make sure that the doc for the method also calls out that the default lock mode is peekLock. Other languages will be doing something similar so we can coordinate and steal/give them our text as well.
(this is also a good time for us to review the readme and make sure we’re clearly talking about and showing the locking methods in all snippets).
Otherwise, this is just a simple cosmetic change.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
Closing with #10102
I did think of it, we can decouple
CreateSessionReceiverOptions
fromCreateReceiverOptions<ReceiveMode>
, the first two overloads would haveBaseCreateSessionReceiverOptions
(the olderCreateSessionReceiverOptions
), the next 4 overloads would include theCreateSessionReceiverOptions<ReceiveMode>
(type CreateSessionReceiverOptions<ReceiveMode> = BaseCreateSessionReceiverOptions & CreateReceiverOptions<ReceiveMode>
)Added https://github.com/Azure/azure-sdk-for-js/commit/699e2dac8362315e0dc6535f325c0a0b9ac4cf59#r41219866