nitro icon indicating copy to clipboard operation
nitro copied to clipboard

fix: Throw if trying to use a complex type as an interface

Open mrousavy opened this issue 1 month ago • 1 comments

Interfaces are simple flat types - they are not stateful and don't have constructors - if you pass a type with a constructor to nitrogen, you likely made a mistake. If you need constructible or stateful types, use HybridObjects.

So we throw here.

mrousavy avatar Nov 08 '25 23:11 mrousavy

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
nitro-docs Skipped Skipped Nov 8, 2025 11:39pm

vercel[bot] avatar Nov 08 '25 23:11 vercel[bot]