question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Schema types break under certain conditions

See original GitHub issue

this may be a https://github.com/harlan-zw/zhead issue…

Here are some things that should be typed properly:

useHead({
  link: [{ rel: 'mask-icon', href: '/safari-pinned-tab.svg', color: '#1a202c' }] // color is not allowed
})
useHead({
  link: [
    ...[].map(() => ({ rel: 'prefetch', href: '' })), // this damages the type inference
    { rel: 'icon', type: 'image/svg', href: '/favicon.svg' },
  ]
})

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
danielroecommented, Oct 14, 2022

Oh, interesting. This may be an issue with the Nuxt types in that case.

0reactions
harlan-zwcommented, Nov 14, 2022

The way that the Schema is typed in v1 is much simpler now which should resolve the issue.

Going to close off for now, if you spot the issue again please let me know 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Breaking Unhealthy Patterns: Part II - Schemas
People develop ways to avoid triggering schemas in order not to feel the pain they come with. There are three types of schema...
Read more >
Schema checks - Apollo GraphQL Docs
Types of schema changes. Not every change to a schema is a potentially breaking change. Additive changes (such as adding a field to...
Read more >
Schema Evolution and Compatibility - Confluent Documentation
The following table presents a summary of the types of schema changes allowed for the different compatibility types, for a given subject. The...
Read more >
Structuring a complex schema — Understanding JSON ...
Like any other code, schemas are easier to maintain if they can be broken down into logical units that reference each other as...
Read more >
What is a schema? - TechTarget
A schema in computer programming is the structure for a database. It is also the formal expression of an inference rule for artificial...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found