27 lines
573 B
TypeScript
27 lines
573 B
TypeScript
export {}
|
|
declare global {
|
|
namespace VitePluginTypes {
|
|
|
|
type FileWatcherEvent = 'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir'
|
|
|
|
interface FileWatcherProcessParam {
|
|
event: FileWatcherEvent
|
|
filePath: string
|
|
isDir: boolean
|
|
getContent: () => string
|
|
}
|
|
|
|
interface FileWatcherAcceptParam {
|
|
event: FileWatcherEvent
|
|
filePath: string
|
|
isDir: boolean
|
|
}
|
|
|
|
interface FileWatcherOptions {
|
|
process: (data: FileWatcherProcessParam) => void
|
|
isAccept: (data: FileWatcherAcceptParam) => boolean
|
|
}
|
|
}
|
|
}
|
|
|