diff --git a/CHANGELOG.md b/CHANGELOG.md index 70a99e2516..5eb6aff95f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed `outside click` not re-focusing the `Menu.Button` ([#220](https://github.com/tailwindlabs/headlessui/pull/220)) - Fixed `outside click` not re-focusing the `Listbox.Button` ([#220](https://github.com/tailwindlabs/headlessui/pull/220)) +- Fix incorrect type error `unique symbol` ([#248](https://github.com/tailwindlabs/headlessui/pull/248), [#240](https://github.com/tailwindlabs/headlessui/issues/240)) ### Added diff --git a/packages/@headlessui-react/src/types.ts b/packages/@headlessui-react/src/types.ts index 6775799076..6d91a8b406 100644 --- a/packages/@headlessui-react/src/types.ts +++ b/packages/@headlessui-react/src/types.ts @@ -1,7 +1,9 @@ import { ReactNode, ReactElement } from 'react' -// A unique placeholder we can use as some defaults. This is nice because we can use this instead of + +// A unique placeholder we can use as a default. This is nice because we can use this instead of // defaulting to null / never / ... and possibly collide with actual data. -const __: unique symbol = Symbol('__placeholder__') +// Ideally we use a unique symbol here. +let __ = '1D45E01E-AF44-47C4-988A-19A94EBAF55C' as const export type __ = typeof __ export type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never