[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>
This commit is contained in:
parent
ee76885287
commit
10b12474ba
1 changed files with 2 additions and 2 deletions
|
@ -1,8 +1,8 @@
|
||||||
import { Emitter, StorageBackend } from "@types";
|
import { Emitter, StorageBackend } from "@types";
|
||||||
import createEmitter from "@lib/emitter";
|
import createEmitter from "@lib/emitter";
|
||||||
|
|
||||||
const emitterSymbol = Symbol("emitter accessor");
|
const emitterSymbol = Symbol.for("vendetta.storage.emitter");
|
||||||
const syncAwaitSymbol = Symbol("wrapSync promise accessor");
|
const syncAwaitSymbol = Symbol.for("vendetta.storage.accessor");
|
||||||
|
|
||||||
export function createProxy(target: any = {}): { proxy: any; emitter: Emitter } {
|
export function createProxy(target: any = {}): { proxy: any; emitter: Emitter } {
|
||||||
const emitter = createEmitter();
|
const emitter = createEmitter();
|
||||||
|
|
Loading…
Reference in a new issue