Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ErrorObject's "links" member does not allow "about" link #134

Open
ealtunyay opened this issue Jan 9, 2020 · 0 comments
Open

ErrorObject's "links" member does not allow "about" link #134

ealtunyay opened this issue Jan 9, 2020 · 0 comments

Comments

@ealtunyay
Copy link

Describe the bug

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"
      }
    }
  ]
};

ErrorObject.links is specified to be a Links type which does not allow an about member. The "Error Objects" section of the spec allows "about" to be a member of "links"

To Reproduce
Steps to reproduce the behavior:

  1. Paste above code into an editor that gives typescript errors

Expected behavior
No error

Additional context
For now, I'm using Record<string, JSONAPI.Link> type for the links member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant