Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/flash.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { format } from 'node:util'
import type { FastifyRequest, FastifyReply } from 'fastify'
import type { SessionData } from '@fastify/secure-session'

declare module '@fastify/secure-session' {
interface SessionData {
flash: { [k: string]: string[] }
}
}

type FlashData = { [k: string]: string[] }
type FlashData = SessionData['flash']
export type ReplyReturn = FlashData | string[]

export function flashFactory () {
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import fp = require('fastify-plugin')
import { flashFactory } from './flash'
import '@fastify/secure-session'

declare module 'fastify' {
export interface FastifyRequest {
Expand Down
Loading