Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

296 B
Raw Blame
import type { CollectionId } from "metabase-types/api";

export const isValidId = (
  collectionId: unknown,
): collectionId is CollectionId => {
  return (
    !!collectionId &&
    (typeof collectionId === "number" ||
      collectionId === "personal" ||
      collectionId === "root")
  );
};