ydb-nodejs-sdk
ydb-nodejs-sdk copied to clipboard
feat: add support for using keyword
Pull request type
Please check one the type of change your PR introduces:
- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):
What does it do?
Adds disposable support
Why is it needed?
Closes #353
How to test it?
{
await using driver = new Driver()
}
// driver destroyed
Related issue(s)/PR(s)
#353
Hi! I have attempted to do some basic test - https://github.com/ydb-platform/ydb-nodejs-sdk/blob/feat/add-support-using/src/tests/e2e/using-keyword.test.ts and received the following error:
TypeError: Symbol.asyncDispose is not defined.|
Seems that something is still missing to start using 'using'
TypeError: Symbol.asyncDispose is not defined.
Hi! Please, provide information about your runtime.
@Zork33 I think, the problem is about your runtime (maybe needs extra compile step)
❯ bun test src/__tests__/e2e/using-keyword.test.ts
bun test v1.1.21 (70ca2b76)
src/__tests__/e2e/using-keyword.test.ts:
Works