Skip to content

Commit 58aa71e

Browse files
authored
fix: use 'type' for type-only imports and specify file extensions (#272)
1 parent 92e4874 commit 58aa71e

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

src/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import {TVConfig, TWMConfig, TWMergeConfig} from "./config";
2-
import {CnOptions, CnReturn, TV} from "./types";
1+
import type {TVConfig, TWMConfig, TWMergeConfig} from "./config.d.ts";
2+
import type {CnOptions, CnReturn, TV} from "./types.d.ts";
33

4-
export * from "./types";
4+
export type * from "./types.d.ts";
55

66
// util function
77
export declare const cnBase: <T extends CnOptions>(...classes: T) => CnReturn;

src/lite.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import {CnOptions, CnReturn, TVLite} from "./types";
1+
import type {CnOptions, CnReturn, TVLite} from "./types.d.ts";
22

3-
export * from "./types";
3+
export type * from "./types.d.ts";
44

55
// util function
66
export declare const cnBase: <T extends CnOptions>(...classes: T) => CnReturn;

src/types.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type {ClassNameValue as ClassValue} from "tailwind-merge";
2-
3-
import {TVConfig} from "./config";
2+
import type {TVConfig} from "./config.d.ts";
43

54
/**
65
* ----------------------------------------

src/utils.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {TWMConfig} from "./config";
2-
import {CnOptions, CnReturn} from "./types";
1+
import type {TWMConfig} from "./config.d.ts";
2+
import type {CnOptions, CnReturn} from "./types.d.ts";
33

44
export declare const falsyToString: <T>(value: T) => T | string;
55

0 commit comments

Comments
 (0)