phetsims / phet-core

Core utilities used by all PhET simulations.
MIT License
8 stars 6 forks source link

PickRequired JsDOC #124

Closed veillette closed 2 years ago

veillette commented 2 years ago

In PickRequired, the jsDOC has an example that shows how to use it as type. The list is not quite correct

Example:
type MyClassOptions = PickRequired<PhetioObject, 'tandem', 'phetioDocumentation'>;
Result:
{ tandem: Tandem, phetioDocumentation: string }

It should be

type MyClassOptions = PickRequired<PhetioObject, 'tandem' | 'phetioDocumentation'>;
pixelzoom commented 2 years ago

Thanks @veillette, good catch. Fixed in the above commit. Closing.