From d02031e41690dee6f50118f0cc2417e6ac5a7f15 Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Mon, 23 Dec 2019 14:05:26 +0200 Subject: [PATCH] typescript(option): feat: readded the .toString() method on None Signed-off-by: prescientmoon --- typescript/option/src/types.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/typescript/option/src/types.ts b/typescript/option/src/types.ts index ae443bb..ab6120b 100644 --- a/typescript/option/src/types.ts +++ b/typescript/option/src/types.ts @@ -6,5 +6,8 @@ type Some = Brand export type Option = Some | None -export const None = { __brand: none } as None +export const None = { + __brand: none, + toString: () => 'None' +} as None export const Some = (value: T) => value as Option