X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftypings%2Fexpress%2Findex.d.ts;h=f58436ce1e406d6db9d3ec152c9383a58bf0a781;hb=76148b27f7501bac061992136852be4303370c8d;hp=55b6e00394ec20d45378e5e185efc469ba9f8a5e;hpb=5ed25fb76e920dac364cb9ef46f14ec4bd372949;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/typings/express/index.d.ts b/server/typings/express/index.d.ts index 55b6e0039..f58436ce1 100644 --- a/server/typings/express/index.d.ts +++ b/server/typings/express/index.d.ts @@ -22,6 +22,7 @@ import { MAccountVideoRateAccountVideo } from '@server/types/models/video/video- import { HttpMethod } from '@shared/core-utils/miscs/http-methods' import { VideoCreate } from '@shared/models' import { File as UploadXFile, Metadata } from '@uploadx/core' +import { ProblemDocumentOptions } from 'http-problem-details/dist/ProblemDocument' import { RegisteredPlugin } from '../../lib/plugins/plugin-manager' import { MAccountDefault, @@ -83,8 +84,15 @@ declare module 'express' { filename: string } - // Extends locals property from Response + // Extends Response with added functions and potential variables passed by middlewares interface Response { + docs?: string + fail: (options: { + data?: Record + docs?: string + message: string + } & ProblemDocumentOptions) => void + locals: { videoAll?: MVideoFullLight onlyImmutableVideo?: MVideoImmutable