Skip to content

Commit

Permalink
fix: use QuartzPluginData type
Browse files Browse the repository at this point in the history
  • Loading branch information
benschlegel committed Sep 15, 2023
1 parent a1cc3dc commit afa9ab0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions quartz/components/ExplorerNode.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-ignore
import { Data } from "vfile"
import { QuartzPluginData } from "vfile"
import { resolveRelative } from "../util/path"

export interface Options {
Expand All @@ -10,7 +10,7 @@ export interface Options {
}

type DataWrapper = {
file: Data
file: QuartzPluginData
path: string[]
}

Expand All @@ -23,10 +23,10 @@ export type FolderState = {
export class FileNode {
children: FileNode[]
name: string
file: Data | null
file: QuartzPluginData | null
depth: number

constructor(name: string, file?: Data, depth?: number) {
constructor(name: string, file?: QuartzPluginData, depth?: number) {
this.children = []
this.name = name
this.file = file ?? null
Expand All @@ -53,7 +53,7 @@ export class FileNode {
}

// Add new file to tree
add(file: Data, splice: number = 0) {
add(file: QuartzPluginData, splice: number = 0) {
this.insert({ file, path: file.filePath!.split("/").splice(splice) })
}

Expand Down Expand Up @@ -109,7 +109,7 @@ export class FileNode {
type ExplorerNodeProps = {
node: FileNode
opts: Options
fileData: Data
fileData: QuartzPluginData
fullPath?: string
}

Expand Down

0 comments on commit afa9ab0

Please sign in to comment.