From 7c053e32baced37b7104b361d5b5442c3c8dd1ba Mon Sep 17 00:00:00 2001 From: Martin Veillette Date: Thu, 22 Sep 2022 10:49:11 -0400 Subject: [PATCH] pass options to Curve in preparation for instrumentation (see #48) Signed-off-by: Martin Veillette --- js/common/model/Curve.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/common/model/Curve.ts b/js/common/model/Curve.ts index d88322f3..464aac6d 100644 --- a/js/common/model/Curve.ts +++ b/js/common/model/Curve.ts @@ -23,7 +23,7 @@ import Emitter from '../../../../axon/js/Emitter.js'; import Utils from '../../../../dot/js/Utils.js'; -import { EmptySelfOptions } from '../../../../phet-core/js/optionize.js'; +import optionize, { EmptySelfOptions } from '../../../../phet-core/js/optionize.js'; import PickRequired from '../../../../phet-core/js/types/PickRequired.js'; import { PhetioObjectOptions } from '../../../../tandem/js/PhetioObject.js'; import calculusGrapher from '../../calculusGrapher.js'; @@ -50,7 +50,10 @@ export default class Curve { public cusps: CurvePoint[] | null; - public constructor( providedOptions: CurveOptions ) { + public constructor( providedOptions?: CurveOptions ) { + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const options = optionize()( {}, providedOptions ); // the Points that map out the curve at a finite number of partitions within // the domain. See the comment at the top of this file for full context.