Open aDogCalledSpot opened 9 months ago
Describe the bug When fetching a database, there isn't a way to properly cast a property to the proper type it's supposed to be since these types aren't exported.
To Reproduce Notion JS library version: current master
Relevant line of code
example:
const response = await notion.databases.retrieve({ database_id }); const options = response.properties["My Select Property"].select; // Won't compile
Expected behavior I would expect type safety when inspecting the properties in my database.
Same deal with UpdateDatabaseBodyParameters
UpdateDatabaseBodyParameters
Yep, it's very painful to work with these types unavailable, especially when using Typescript.
The same stands for DatabaseObjectResponse
DatabaseObjectResponse
Describe the bug When fetching a database, there isn't a way to properly cast a property to the proper type it's supposed to be since these types aren't exported.
To Reproduce Notion JS library version: current master
Relevant line of code
example:
Expected behavior I would expect type safety when inspecting the properties in my database.