Skip to content

Commit

Permalink
dynamic string support for OopsDialog, phetsims/natural-selection#319
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Aug 27, 2022
1 parent 415dc72 commit 28f3613
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/OopsDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* @author Chris Malley (PixelZoom, Inc.)
*/

import TReadOnlyProperty from '../../axon/js/TReadOnlyProperty.js';
import optionize, { EmptySelfOptions } from '../../phet-core/js/optionize.js';
import StrictOmit from '../../phet-core/js/types/StrictOmit.js';
import { HBox, Image, Node, RichText, RichTextOptions } from '../../scenery/js/imports.js';
Expand Down Expand Up @@ -35,7 +36,7 @@ export default class OopsDialog extends Dialog {
* @param messageString - supports RichText formatting
* @param [providedOptions]
*/
public constructor( messageString: string, providedOptions?: OopsDialogOptions ) {
public constructor( messageString: string | TReadOnlyProperty<string>, providedOptions?: OopsDialogOptions ) {

const options = optionize<OopsDialogOptions, StrictOmit<SelfOptions, 'iconNode' | 'richTextOptions'>, DialogOptions>()( {

Expand Down

0 comments on commit 28f3613

Please sign in to comment.