mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* add VoidPattern definition * update types artifacts * parse void binding * print void binding * fix typing errors * update parser typings * fix: remove VoidPattern from ForXStatement.left * fix typing errors * add Babel 8 tests * require syntaxType option * add test for object-rest-spread change * feat(types): disallow void pattern in var/let/const declaration * fix: allow nested void pattern in catch param * improve UnexpectedVoidPattern error message * remove R&T integration parser tests * polish: throw different error when CoverDiscardElement is parsed * Update expression.ts Co-authored-by: liuxingbaoyu <[email protected]> * update discardBinding plugin option types --------- Co-authored-by: liuxingbaoyu <[email protected]>
35 lines
600 B
JavaScript
35 lines
600 B
JavaScript
{
|
|
// using 1 declarator
|
|
using void = f();
|
|
}
|
|
{
|
|
// using 2 declarators
|
|
using void = f(), void = g();
|
|
}
|
|
{
|
|
// using void declarator and normal declarator
|
|
using void = f(), x = g();
|
|
}
|
|
{
|
|
// using declarator in for-of
|
|
for(using void of []);
|
|
}
|
|
async () => {
|
|
{
|
|
// await using 1 declarator
|
|
await using void = f();
|
|
}
|
|
{
|
|
// await using 2 declarators
|
|
await using void = f(), void = g();
|
|
}
|
|
{
|
|
// await using void declarator and normal declarator
|
|
await using void = f(), x = g();
|
|
}
|
|
{
|
|
// await using declarator in for-of
|
|
for(await using void of []);
|
|
}
|
|
}
|