You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The xata object for records returned using search API has still a standard XataRecordMetadata type:
typeXataRecordMetadata={/** * Number that is increased every time the record is updated. */version: number;/** * Timestamp when the record was created. */createdAt: Date;/** * Timestamp when the record was last updated. */updatedAt: Date;};
There's no highlight or score options like in SearchExtraProperties type, although they are normally available in the code.
The only way to get it properly typed is to use the getMetadata() function on given record, however I can't see any reason why the xata object couldn't be typed directly.
Describe the bug
The
xata
object for records returned using search API has still a standardXataRecordMetadata
type:There's no
highlight
orscore
options like inSearchExtraProperties
type, although they are normally available in the code.The only way to get it properly typed is to use the
getMetadata()
function on given record, however I can't see any reason why thexata
object couldn't be typed directly.To Reproduce
highlight
option later in the code:TS2339: Property highlight does not exist on type XataRecordMetadata
Expected behavior
TypeScript knows that
xata
object for records returned bysearch
function contains the same properties as defined inSearchExtraProperties
type:Software version
"@xata.io/client": "^0.29.0"
Additional context
The text was updated successfully, but these errors were encountered: