Skip to content

Commit 81a231d

Browse files
authored
Update defaultIsBad.md
1 parent cf3a5d1 commit 81a231d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/tips/defaultIsBad.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,15 @@ Highcharts.default.chart('container', { ... }); // Notice `.default`
7474
Can be one statement for function / class e.g.
7575

7676
```ts
77-
export default function() {
77+
export default function foo() {
7878
}
7979
```
8080

8181
But needs two statements otherwise:
8282
```ts
83-
const foo = 123;
83+
const foo = {
84+
notAFunction: 'Yeah, I am not a function or a class',
85+
soWhat: 'The export is now *removed* from the declaration'
86+
};
8487
export default foo;
8588
```

0 commit comments

Comments
 (0)