We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd45b60 commit cf3a5d1Copy full SHA for cf3a5d1
docs/tips/defaultIsBad.md
@@ -68,3 +68,18 @@ Default exports expose themselves badly named as `default` in dynamic `import`s
68
const HighChart = await import('https://code.highcharts.com/js/es-modules/masters/highcharts.src.js');
69
Highcharts.default.chart('container', { ... }); // Notice `.default`
70
```
71
+
72
+### Needs two lines for non-class / non-function
73
74
+Can be one statement for function / class e.g.
75
76
+```ts
77
+export default function() {
78
+}
79
+```
80
81
+But needs two statements otherwise:
82
83
+const foo = 123;
84
+export default foo;
85
0 commit comments