refactor: move from union type to object enum
This commit is contained in:
@@ -24,7 +24,8 @@ export class InMemoryFileSystem implements IFileSystem {
|
||||
}
|
||||
|
||||
async readdir(path: string): Promise<string[]> {
|
||||
const prefix = path.endsWith("/") || path.endsWith("\\") ? path : path + "/";
|
||||
const prefix =
|
||||
path.endsWith("/") || path.endsWith("\\") ? path : path + "/";
|
||||
const seen = new Set<string>();
|
||||
for (const key of this.#files.keys()) {
|
||||
if (key.startsWith(prefix)) {
|
||||
|
||||
Reference in New Issue
Block a user