Skip to content

Commit

Permalink
feat: dev mode use named symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaoboy committed Apr 17, 2022
1 parent 431973e commit 5b6ca3a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/vanilla.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { getUntracked, markToTrack } from 'proxy-compare'

const VERSION = Symbol()
const LISTENERS = Symbol()
const SNAPSHOT = Symbol()
const HANDLER = Symbol()
const PROMISE_RESULT = Symbol()
const PROMISE_ERROR = Symbol()
const VERSION = Symbol(__DEV__ ? 'VERSION' : '')
const LISTENERS = Symbol(__DEV__ ? 'LISTENERS' : '')
const SNAPSHOT = Symbol(__DEV__ ? 'SNAPSHOT' : '')
const HANDLER = Symbol(__DEV__ ? 'HANDLER' : '')
const PROMISE_RESULT = Symbol(__DEV__ ? 'PROMISE_RESULT' : '')
const PROMISE_ERROR = Symbol(__DEV__ ? 'PROMISE_ERROR' : '')

type AsRef = { $$valtioRef: true }
const refSet = new WeakSet()
Expand Down

0 comments on commit 5b6ca3a

Please sign in to comment.