import * as JSONAPI from "jsonapi-typescript";
// ⛔️ Error: Object literal may only specify known properties, and 'about' does not
// exist in type 'Links'.ts(2322)
let doc: JSONAPI.Document = {
errors: [
{
links: {
about: "http://www.example.com/about"
}
}
]
};
Describe the bug
ErrorObject.links
is specified to be aLinks
type which does not allow anabout
member. The "Error Objects" section of the spec allows "about" to be a member of "links"To Reproduce Steps to reproduce the behavior:
Expected behavior No error
Additional context For now, I'm using
Record<string, JSONAPI.Link>
type for thelinks
member