Skip to content

Commit d6d2e23

Browse files
committed
fix: use Symbol.for to make sure two concurrent versions of ts-pattern are compatible with one-another
1 parent ba408d8 commit d6d2e23

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/internals/symbols.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
* @internal
1414
*/
1515

16-
export const matcher = Symbol('@ts-pattern/matcher');
16+
export const matcher = Symbol.for('@ts-pattern/matcher');
1717
export type matcher = typeof matcher;
1818

19-
export const unset = Symbol('@ts-pattern/unset');
19+
export const unset = Symbol.for('@ts-pattern/unset');
2020
export type unset = typeof unset;
2121

22-
export const isVariadic = Symbol('@ts-pattern/isVariadic');
22+
export const isVariadic = Symbol.for('@ts-pattern/isVariadic');
2323
export type isVariadic = typeof isVariadic;
2424

2525
export const anonymousSelectKey = '@ts-pattern/anonymous-select-key';
2626
export type anonymousSelectKey = typeof anonymousSelectKey;
2727

28-
export const override = Symbol('@ts-pattern/override');
28+
export const override = Symbol.for('@ts-pattern/override');
2929
export type override = typeof override;

0 commit comments

Comments
 (0)