diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bf2b8b8bb..69fc9da8cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased - React] -- Nothing yet! +- Fix incorrect type error `unique symbol` ([#248](https://github.com/tailwindlabs/headlessui/pull/248), [#240](https://github.com/tailwindlabs/headlessui/issues/240)) ## [Unreleased - Vue] 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