SvelteKit "User Management App" Docs - safeGetSession typescript error #26280
Labels
documentation
Improvements or additions to documentation
good first issue
Good for newcomers
help wanted
Extra attention is needed
Improve documentation
Link
Add a link to the page which needs improvement (if relevant)
Build a User Management App with SvelteKit
Describe the problem
In the section related to adding types to 'app.d.ts' in order to correct typescript compiler errors, using what is provided will create another error in a different document:
Following the next steps, +layout.ts will have the compiler complaining because the returned objects will not have the user property that is specified in this type declaration for safeGetSession().
Describe the improvement
Mark the 'user' property with a question mark to indicate that it is an optional property in the return type.
Additional context
Screenshot of page where the issue occurs:
The text was updated successfully, but these errors were encountered: