Skip to content

Commit

Permalink
fix unique symbol error (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinMalfait committed Apr 2, 2021
1 parent 054d90d commit f778587
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
6 changes: 4 additions & 2 deletions packages/@headlessui-react/src/types.ts
Original file line number Diff line number Diff line change
@@ -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> = T extends infer O ? { [K in keyof O]: O[K] } : never
Expand Down

0 comments on commit f778587

Please sign in to comment.