Skip to content

Commit 573521c

Browse files
committed
chore: enhance ts
1 parent 49beae9 commit 573521c

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { emoji, characters, NodeTypes } from './config'
2-
import { Options, TreeNode } from './type'
32
import { blue } from 'picocolors'
3+
import type { Options, TreeNode } from './type'
44

55
const lastDirStack: boolean[] = []
66

src/handleOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import fs from 'fs'
2-
import { Options } from './type'
32
import { fileExistSync } from './utils'
3+
import type { Options } from './type'
44

55
export const onExits: ((output: string) => void)[] = []
66

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { toTree } from './toTree'
55
import { generate } from './generate'
66
import pkg from '../package.json'
77
import { handleOptions, onExits } from './handleOptions'
8-
import { Options } from './type'
8+
import type { Options } from './type'
99

1010
program
1111
.name('treei')

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import fs from 'fs'
2-
import { TreeNode } from './type'
2+
import type { TreeNode } from './type'
33

44
// check if a file or directory exists.
55
export function fileExistSync(path: string) {

test/toTree.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { describe, test, expect } from 'vitest'
22
import { toTree } from '../src/toTree'
3-
import { Options } from '../src/type'
43
import { NodeTypes } from '../src/config'
54
import { getMaxLayer } from '../src/utils'
5+
import type { Options } from '../src/type'
66

77
describe('toTree', () => {
88
const options: Options = {

0 commit comments

Comments
 (0)