babel/packages/babel-generator
Michael サイトー 中村 Bashurov d05fdbc3c7
Fix invalid print output when empty array is passed to t.tsInterfaceDeclaration (#12921)
If you pass an empty array as `extends` in `t.tsInterfaceDeclaration` you'll get an invalid code printed

```ts
t.tsInterfaceDeclaration(
  t.identifier('x'),
  undefined,
  [],
  t.tsInterfaceBody([])
)
```

You will get
```ts
interface A extends {}
```

Which is an invalid TS, this PR fixes that
2021-03-01 10:43:24 -05:00
..
2021-02-22 23:35:18 +01:00

@babel/generator

Turns an AST into code.

See our website @babel/generator for more information or the issues associated with this package.

Install

Using npm:

npm install --save-dev @babel/generator

or using yarn:

yarn add @babel/generator --dev