-
What language is this for? Typescript
-
Which rule? tsarchitecture:S7197
-
Why do you believe it’s a false-positive/false-negative? false positive
-
Are you using ? Enterprise Edition v2025.4.3 Standard Experience
-
How can we reproduce the problem? Give us a self-contained snippet of code (formatted text, no screenshots)
Just 2 typescript files exporting types from each others.
A.ts
import { B } from './B.ts'
export type A = { b: B }
B.ts
import { A } from './A.ts'
export type B = { a: A }
It should not be detected as a cycle, typescript types are erased when converted to JS, they do not provoque circular module loading.
For exemple the eslint-plugin-import with its rule no-cycle used to flagged it as a cycle, but no longer do it.
It is also a recommended pattern in Redux where the root state type is inferred by TypeScript from imported reducers.
And look at the default Oxlint where ignoreTypes default to true.