Using the final Notion API in TypeScript, I retrieve block children. However, accessing the ‘to_do’ attribute triggers a type error. Code sample provided below:
(async function fetchBlocks() {
const uniqueKey = process.env.UNIQUE_BLOCK_ID;
const resultSet = await client.blocks.children.list({
block_id: uniqueKey,
max_items: 50
});
console.log(resultSet.results[0].to_do);
})();