From aab153b6907a184b4e6191cc34ed4f0d9c0728a3 Mon Sep 17 00:00:00 2001 From: Rafin Akther Utshaw Date: Mon, 28 Jul 2025 01:36:08 +0300 Subject: [PATCH 1/2] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The removed lines below are actually allowed in typescript. // ❌ This is not allowed due to type safety // const selectedType2: MediaTypes = MediaTypes.Video; // ❌ This is not allowed due to type safety // const invalidType: MediaTypes = 'image'; --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index bf43aa5..973a567 100644 --- a/README.md +++ b/README.md @@ -314,14 +314,9 @@ enum MediaTypes { const selectedType: MediaTypes = MediaTypes.Image; -// ❌ This is not allowed due to type safety -// const selectedType2: MediaTypes = MediaTypes.Video; - // ✅ Accessing the value const associatedText: string = MediaTypes.Image; -// ❌ This is not allowed due to type safety -// const invalidType: MediaTypes = 'image'; ``` the Enum helps ensure the proper data type and its values. From bbaf945eba8fa14413a0311b366ea6f5e5c47d4f Mon Sep 17 00:00:00 2001 From: Rafin Akther Utshaw Date: Tue, 29 Jul 2025 16:19:27 +0300 Subject: [PATCH 2/2] Undo deleted comment --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 973a567..c86e9ce 100644 --- a/README.md +++ b/README.md @@ -317,6 +317,8 @@ const selectedType: MediaTypes = MediaTypes.Image; // ✅ Accessing the value const associatedText: string = MediaTypes.Image; +// ❌ This is not allowed due to type safety +// const invalidType: MediaTypes = 'image'; ``` the Enum helps ensure the proper data type and its values.