export type VisitedQuestions = number[][];

export type Directory = {
    name: string;
    isDir: true;
};

export type Ressource = {
    _id: string;
    fullpath: string;
    path: string;
    user: string;
    mimetype: string;
    name: string;
    filename: string;
};

export function isDir(dir: Directory | Ressource): dir is Directory {
    return (dir as Directory).isDir === true;
}

export function isRessource(ressource: Ressource | Directory): ressource is Ressource {
    return (ressource as Directory).isDir === undefined;
}

export type GameId = string;

export type Game = {
    name: string;
    owner: string;
    _id: GameId;
    walls: WallId[];
};

export type WallId = string;
