UNPKG

@becklyn/contentful-adapter

Version:

[![CI](https://github.com/Becklyn-Studios/contentful-adapter/actions/workflows/ci.yml/badge.svg)](https://github.com/Becklyn-Studios/contentful-adapter/actions/workflows/ci.yml)

11 lines (10 loc) 436 B
import { PageForCache } from "./types"; import { Entry } from "contentful"; export interface PageCache { getSlugOfPage: (id: string) => string; getTitleOfPage: (id: string) => string; getTitleOfPageBySlug: (slug: string) => string | null; getIdOfPageBySlug: (slug: string) => string | null; isSlugExisting: (slug: string) => boolean; } export declare const getPageCache: (pages: Entry<PageForCache>[]) => PageCache;