Skip to content

Commit

Permalink
chore: enhance ts
Browse files Browse the repository at this point in the history
  • Loading branch information
w2xi committed Dec 14, 2024
1 parent 49beae9 commit 573521c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/generate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { emoji, characters, NodeTypes } from './config'
import { Options, TreeNode } from './type'
import { blue } from 'picocolors'
import type { Options, TreeNode } from './type'

const lastDirStack: boolean[] = []

Expand Down
2 changes: 1 addition & 1 deletion src/handleOptions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'fs'
import { Options } from './type'
import { fileExistSync } from './utils'
import type { Options } from './type'

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

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { toTree } from './toTree'
import { generate } from './generate'
import pkg from '../package.json'
import { handleOptions, onExits } from './handleOptions'
import { Options } from './type'
import type { Options } from './type'

program
.name('treei')
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'fs'
import { TreeNode } from './type'
import type { TreeNode } from './type'

// check if a file or directory exists.
export function fileExistSync(path: string) {
Expand Down
2 changes: 1 addition & 1 deletion test/toTree.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { describe, test, expect } from 'vitest'
import { toTree } from '../src/toTree'
import { Options } from '../src/type'
import { NodeTypes } from '../src/config'
import { getMaxLayer } from '../src/utils'
import type { Options } from '../src/type'

describe('toTree', () => {
const options: Options = {
Expand Down

0 comments on commit 573521c

Please sign in to comment.