@ayonli/jsext
Version:
A JavaScript extension package for building strong and modern applications.
17 lines (16 loc) • 619 B
TypeScript
import { DirEntry } from "./types.ts";
export declare function fixDirEntry<T extends DirEntry>(entry: T): T;
export declare function fixFileType(file: File): File;
type CompatDirEntry = Omit<DirEntry, "kind"> & {
kind: string;
};
type CompatDirTree = Omit<DirEntry, "kind"> & {
kind: string;
children?: CompatDirTree[];
};
/**
* @param addPathProp `DirEntry.prop` is deprecated, this option is for backward
* compatibility.
*/
export declare function makeTree<I extends CompatDirEntry, R extends CompatDirTree>(dir: string | FileSystemDirectoryHandle, entries: I[], addPathProp?: boolean): R;
export {};