Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
[TS] Use Symbol.for for emitterSymbol & syncAwaitSymbol (#130)
Browse files Browse the repository at this point in the history
* [TS] Export emitterSymbol & syncAwaitSymbol

* [TS] Use Symbol.for instead

* [TS] Rename symbol names

Co-authored-by: Amsyar Rasyiq <[email protected]>

---------

Co-authored-by: Amsyar Rasyiq <[email protected]>
  • Loading branch information
nexpid and pylixonly authored Aug 13, 2023
1 parent ee76885 commit 10b1247
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/storage/index.ts
Original file line number Diff line number Diff line change
@@ -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();
Expand Down

0 comments on commit 10b1247

Please sign in to comment.