Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Latest commit

 

History

History
22 lines (16 loc) · 475 Bytes

no-import-default-of-export-equals.md

File metadata and controls

22 lines (16 loc) · 475 Bytes

no-import-default-of-export-equals

Don't use a default import of a package that uses export =. Users who do not have --allowSyntheticDefaultExports or --esModuleInterop will get different behavior. This rule only applies to definition files -- for test files you can use a default import if you prefer.

Bad:

// foo/index.d.ts
declare interface I {}
export = I;

// bar/index.d.ts
import I from "foo";

Good:

import I = require("foo");