1
Fork 0

typescript(option): refactor: no longer using the useless some symbol

typescript(option):
typescript(option): The symbol was never actually used so declaring it is good enough

Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
Matei Adriel 2019-12-23 14:24:23 +02:00 committed by prescientmoon
parent f46ef3dbf8
commit 445bab939e
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
2 changed files with 4 additions and 2 deletions

View file

@ -1,4 +1,3 @@
export const identity = <T>(v: T) => v export const identity = <T>(v: T) => v
export const some = Symbol('some')
export const none = Symbol('none') export const none = Symbol('none')

View file

@ -1,6 +1,9 @@
import { some, none } from './internals' import { none } from './internals'
import { Brand } from 'utility-types' import { Brand } from 'utility-types'
// This is never actually used outside of typing so we can just declare it
declare const some: unique symbol
type None = Brand<void, typeof none> type None = Brand<void, typeof none>
type Some<T> = Brand<T, typeof some> type Some<T> = Brand<T, typeof some>