#[SOLVED] Locals type-safety ain't working
5 messages · Page 1 of 1 (latest)
/** @link <https://docs.astro.build/en/guides/typescript/#using-imports> */
declare namespace App {
interface Locals {
user?: import("@models/user").User;
}
}
That should fix it
The docs section linked in there explains why you need inline imports
If your issue is resolved, please help by doing the following two steps:
- From the ellipses (3-dot menu) in the top-right corner of the post (not the first message), edit the tags to include the Solved tag.
- From the same ellipses, select Close Post.
Your post will still be available to search and can be re-opened simply by replying in it. Closing a post moves it down with older posts, so we can more easily focus on issues that still need to be resolved.
Thank you for your help!
Sorry didn't read it carefully enough although I added the JSdoc link ref, it's fixed now.
Thanks 😄