Support single element or top level arrays
- Vorherrschende Sprache
- JavaScript
- Sterne
- 221
- Forks
- 8
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Building on @theianjones's proposal in #3.
> 1 open question is how to represent an array with a single element. The only idea I had was fragments like `<>...`. But that would be a separate PR anyway.
Given a component-like function:
```jsx
const Aliases = () => (
<>
)
```
Expect ``:
```json5
[
{
// name: "alias",?
from: "react",
to: "preact-compat",
},
{
// name: "alias",?
from: "react-dom",
to: "preact-compat",
},
]
```
Given:
```jsx
const Resolve = () => (
<>
)
```
Expect ``:
```json5
{
name: "resolve",
alias: [
{
from: "react-dom",
to: "preact-compat",
},
],
}
```
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.