schema-dts
schema-dts copied to clipboard
sameAs as an array
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/",
]
}
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!
@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? 🙏🏼