Skip to content

Commit 7eb1bb9

Browse files
docs: document caveat with greenwood nested type imports
1 parent 2265eeb commit 7eb1bb9

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/pages/docs/resources/typescript.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,17 @@ Currently TypeScript only supports types for standard [JSON Import Attributes](h
9595
</app-ctc-block>
9696

9797
<!-- prettier-ignore-end -->
98+
99+
## Type Imports
100+
101+
Due to a [known issue in NodeJS](https://github.com/nodejs/node/issues/58422), when doing `type` based imports for [Greenwood's types](https://github.com/ProjectEvergreen/greenwood/issues/1576), it will be required to _**not**_ use nested type imports.
102+
103+
Example:
104+
105+
```ts
106+
// ✅ DO THIS
107+
import type { Page } from "@greenwood/cli";
108+
109+
// ❌ NOT THIS
110+
import { type Page } from "@greenwood/cli";
111+
```

0 commit comments

Comments
 (0)