Closed
Description
Search Terms:
unused local typeof variable noUnusedLocals
Code
// @noUnusedLocals: true
import { x } from "something"
export type X = typeof x
Expected behavior:
An error on import { x }
, "x is never used"
Actual behavior:
No error
Related Issues:
This bug was fixed in #28528 and then reverted in #28675 because it broke a common pattern in Redux type exports, as documented in #28620. However, it still seems correct (at least, technically correct) that a reference to x
in typeof x
shouldn't count as a use.