Skip to content

Commit

Permalink
add a few more basic options to TrimmedParallelDOMOptions, see #1666
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Oct 28, 2024
1 parent 093cb9d commit 4abd550
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions js/accessibility/pdom/ParallelDOM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,11 @@ type ParallelDOMSelfOptions = {
// behaves as a default.
export type ParallelDOMOptions = ParallelDOMSelfOptions & PhetioObjectOptions;

type AccessibleNameAndHelpTextOptions = PickOptional<ParallelDOMSelfOptions, 'accessibleName' | 'helpText'>;

// Removes all options from T that are in ParallelDOMSelfOptions, except for accessibleName and helpText.
// This is uefeful for creating a ParallelDOM subclass that only exposes these high level options.
export type TrimmedParallelDOMOptions<T extends ParallelDOMSelfOptions> = StrictOmit<T, keyof ParallelDOMSelfOptions> & AccessibleNameAndHelpTextOptions;
// Removes all options from T that are in ParallelDOMSelfOptions, except for the most fundamental ones.
// This is uefeful for creating a ParallelDOM subclass that only exposes these high level options while implementing accessibility
// with the lower level API.
export type TrimmedParallelDOMOptions<T extends ParallelDOMSelfOptions> = StrictOmit<T, keyof ParallelDOMSelfOptions>
& PickOptional<ParallelDOMSelfOptions, 'accessibleName' | 'helpText' | 'focusable' | 'pdomVisible'>;

type PDOMAttribute = {
attribute: string;
Expand Down

0 comments on commit 4abd550

Please sign in to comment.