Skip to content

Commit

Permalink
Recommend import = in MissingExportEquals.md
Browse files Browse the repository at this point in the history
  • Loading branch information
benasher44 committed Feb 25, 2024
1 parent 5499c36 commit 89ab548
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/problems/MissingExportEquals.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ This merging namespace can also be used to declare the `default` property when t
```ts
declare function Whatever(props: Whatever.WhateverProps): void;
declare namespace Whatever {
declare const _default: typeof Whatever;
// using `import =` syntax ensures the CJS-default-import continues to work as a namespace
import _default = Whatever;
export { _default as default };

export interface WhateverProps {
Expand Down

0 comments on commit 89ab548

Please sign in to comment.