10 lines
453 B
TypeScript
10 lines
453 B
TypeScript
import { Buffer } from '@jsonjoy.com/fs-node-builtins/lib/internal/buffer';
|
|
export type DirectoryContent = string | Buffer | null;
|
|
export interface DirectoryJSON<T extends DirectoryContent = DirectoryContent> {
|
|
[key: string]: T;
|
|
}
|
|
export interface NestedDirectoryJSON<T extends DirectoryContent = DirectoryContent> {
|
|
[key: string]: T | NestedDirectoryJSON;
|
|
}
|
|
export declare const flattenJSON: (nestedJSON: NestedDirectoryJSON) => DirectoryJSON;
|