From fba87e27c1cb6c679fff0d2c50be230f7e0c3e56 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 28 Dec 2021 15:30:36 +0100 Subject: Resolve enums at compile time --- shared/models/http/http-error-codes.ts | 2 +- shared/models/http/http-methods.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'shared/models/http') diff --git a/shared/models/http/http-error-codes.ts b/shared/models/http/http-error-codes.ts index b2fbdfc5a..5ebff1cb5 100644 --- a/shared/models/http/http-error-codes.ts +++ b/shared/models/http/http-error-codes.ts @@ -4,7 +4,7 @@ * * WebDAV and other codes useless with regards to PeerTube are not listed. */ -export enum HttpStatusCode { +export const enum HttpStatusCode { /** * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.2.1 diff --git a/shared/models/http/http-methods.ts b/shared/models/http/http-methods.ts index 1cfa458b9..3f4adafe2 100644 --- a/shared/models/http/http-methods.ts +++ b/shared/models/http/http-methods.ts @@ -1,5 +1,5 @@ /** HTTP request method to indicate the desired action to be performed for a given resource. */ -export enum HttpMethod { +export const enum HttpMethod { /** The CONNECT method establishes a tunnel to the server identified by the target resource. */ CONNECT = 'CONNECT', /** The DELETE method deletes the specified resource. */ -- cgit v1.2.3