astronotion
Version:
Library to make Astro sites with content from Notion
11 lines (10 loc) • 405 B
TypeScript
import type { BlockMap, Decoration } from "notion-types";
/**
* Get plain text from a notion-client "Block" data, which consists
* of nested arrays with formatting metadata.
*
* @param {Decoration[]} data
* @returns {string} text content
*/
export declare const flattenText: (data: Decoration[]) => string;
export declare const flattenBlocks: (blockMap: BlockMap) => import("notion-types").Block[];