Skip to content

Commit 09a91cd

Browse files
type import recommendations
1 parent 98823a4 commit 09a91cd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/pages/docs/resources/typescript.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The below steps will help you get up and running with TypeScript in your Greenwo
2929
{
3030
"compilerOptions": {
3131
// minimum required configuration
32-
"target": "es2020",
32+
"target": "es2020", // needs to be at least >= es2015 for `class` support
3333
"module": "preserve",
3434
"moduleResolution": "bundler",
3535
"allowImportingTsExtensions": true,
@@ -75,6 +75,8 @@ In addition to being able to author your components, SSR pages, and API routes i
7575

7676
<!-- prettier-ignore-end -->
7777

78+
> We recommend putting the `type` on the outside of the braces to avoid [inadvertent bundling](https://github.com/ProjectEvergreen/greenwood/issues/1576) of the package your importing from.
79+
7880
See our [reference docs on Greenwood's available types](/docs/reference/appendix/#types) for more information on authoring with TypeScript.
7981

8082
### Import Attributes

0 commit comments

Comments
 (0)