Closed nlnw closed 1 month ago
You'll need an extra check or custom property schema, since TypeScript isn't sure which formula your page has.
const property = post.data.properties.MyFormula.formula;
if (property.type === 'string') {
return property.string
} else {
throw new Error()
}
When I use a formula in my database, the property is available through:
post.data.properties.MyFormula.formula.string
But this gives a type error.