Skip to content

🔄 Unused exported type is not reported when annotated inside an exported function body #1765

Description

@abrahamguo

Prerequisites

Reproduction url

https://github.com/abrahamguo/repro/tree/knip-fn

Reproduction access

  • I've made sure the reproduction is publicly accessible

Good version

6.12.0

Bad version

6.12.1

Description of the regression

lib.ts:

export type T = 0;
export const f = () => {
	let _: T;
};

entry.ts:

import { f } from './lib.ts';

T is unused, but Knip no longer reports it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    regressionSomething is no longer working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions