From 10b12474ba49abf316806e15dcefef7ce1b06a1c Mon Sep 17 00:00:00 2001 From: Gabe616 Date: Sun, 13 Aug 2023 14:21:42 +0200 Subject: [PATCH] [TS] Use Symbol.for for emitterSymbol & syncAwaitSymbol (#130) * [TS] Export emitterSymbol & syncAwaitSymbol * [TS] Use Symbol.for instead * [TS] Rename symbol names Co-authored-by: Amsyar Rasyiq <82711525+amsyarasyiq@users.noreply.github.com> --------- Co-authored-by: Amsyar Rasyiq <82711525+amsyarasyiq@users.noreply.github.com> --- src/lib/storage/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/storage/index.ts b/src/lib/storage/index.ts index 92bd8df..fb72e35 100644 --- a/src/lib/storage/index.ts +++ b/src/lib/storage/index.ts @@ -1,8 +1,8 @@ import { Emitter, StorageBackend } from "@types"; import createEmitter from "@lib/emitter"; -const emitterSymbol = Symbol("emitter accessor"); -const syncAwaitSymbol = Symbol("wrapSync promise accessor"); +const emitterSymbol = Symbol.for("vendetta.storage.emitter"); +const syncAwaitSymbol = Symbol.for("vendetta.storage.accessor"); export function createProxy(target: any = {}): { proxy: any; emitter: Emitter } { const emitter = createEmitter();