Skip to content

Commit

Permalink
Add fixture for #687
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Jun 21, 2024
1 parent 0c56610 commit e15da45
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/knip/fixtures/exports-value-refs/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import type { MyInterface } from './refs.js';

const x: MyInterface = { _class: 1, _type: { key: 1 }, _fn: () => {}, _const: 1 };
9 changes: 9 additions & 0 deletions packages/knip/fixtures/exports-value-refs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "@fixtures/exports-value-refs",
"knip": {
"ignoreExportsUsedInFile": {
"interface": true,
"type": true
}
}
}
16 changes: 16 additions & 0 deletions packages/knip/fixtures/exports-value-refs/refs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export interface MyInterface {
_class: MyClass;
_type: MyType;
_fn: typeof fn;
_const: typeof c;
}

export type MyType = {
key: 1;
};

export class MyClass {}

export function fn() {}

export const c = 1;

0 comments on commit e15da45

Please sign in to comment.