@texonom/ntypes
v1.5.8
Published
TypeScript types for core Notion data structures.
Readme
ntypes
TypeScript types for core Notion data structures.
Features
- Strict typings for blocks, users and search results
- Shared between all packages in this monorepo
Install
pnpm i @texonom/ntypesUsage
import type { ExtendedRecordMap } from '@texonom/ntypes'
function handle(record: ExtendedRecordMap) {
console.log(record.block)
}import type { Block } from '@texonom/ntypes/block'
const block: Block = {
id: 'id',
type: 'text'
// ...
}See the full docs for details.
API
This package re-exports grouped type definitions:
core– shared base typesblock– block datauser– user informationcollectionandcollection-viewformulaandmapsapirequest/response shapesspaceworkspace info
