-
-
Notifications
You must be signed in to change notification settings - Fork 20
Make mandatory session properties immutable #54
base: main
Are you sure you want to change the base?
Changes from all commits
565947c
91e9fe8
3a93dc3
98ecd11
5d000e4
660b6ed
564cbf5
f35461a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,9 +183,15 @@ export interface ModulePublicRuntimeConfig { | |
} | ||
|
||
export declare interface Session { | ||
id: string; | ||
createdAt: Date; | ||
ip?: string; | ||
readonly id: string; | ||
readonly createdAt: Date; | ||
readonly ip?: string; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and, sorry to kind of push this in here, but as we're already working on the whuile you're add it? This way, typing for the end-user should improve when they access There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added it, but somehow the types aren't available when packed and imported as module in a project. Any suggestions? |
||
|
||
[key: string]: any; | ||
} | ||
|
||
declare module 'h3' { | ||
interface H3EventContext { | ||
session: Session | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.