@sota1235/notion-sdk-js-helper
Version:
Helper utilities for using @notion/client
9 lines (8 loc) • 404 B
TypeScript
import type { PageObjectResponse } from "@notionhq/client/build/src/api-endpoints.js";
type Properties = PageObjectResponse["properties"];
type Property = Properties[string];
export type ResponsePropertyBlock<T extends string> = Extract<Property, {
type: T;
}>;
export declare const isExactProperty: <T extends string>(type: T, property: Property) => property is ResponsePropertyBlock<T>;
export {};