|
|
|
|
|
by masklinn
1100 days ago
|
|
The last example: {
await using { connection } = getConnection();
// Do stuff with connection
} // Automatically closed!
edit: according to the ES proposal issues, this might be something that doesn't actually exist, on purpose (it's rather ambiguous as to what will be disposed of): https://github.com/tc39/proposal-explicit-resource-managemen... |
|
I did also click through to the proposal but didn't see that issue. It does seem like it's still unclear what's intentional or not.