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

sameAs as an array #185

Open
retroriff opened this issue May 30, 2022 · 2 comments
Open

sameAs as an array #185

retroriff opened this issue May 30, 2022 · 2 comments

Comments

@retroriff
Copy link

I see that sameAs is a string attribute and I was wondering if it also should be a string[] so it can accept a list of social networks, as explained here.

{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Company Name",
  "url": "company.com",
  "logo": "company.com/logo.png",
  "sameAs": [
    "https://facebook.com/",
    "https://twitter.com/",
  ]
}
@Eyas
Copy link
Collaborator

Eyas commented May 31, 2022

Yep, all attributes (other than "@context", "@type", and "@id") can be either their direct type or an array as-is. Let me know if you're having trouble using it as such!

@mirhamasala
Copy link

@Eyas I'm having a some trouble using string[] for sameAs

Type 'string[]' is not assignable to type 'string | Role<string, "sameAs">'.ts(2322)

Any insight? 🙏🏼

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

3 participants