live-share-sdk icon indicating copy to clipboard operation
live-share-sdk copied to clipboard

[Feature Request]: Use param objects where they make sense for named variables.

Open huntj88 opened this issue 1 year ago • 0 comments

Describe your user scenario We have several places where we have a bunch of flags, or optional variables.

Instead of seeing something like

// no longer optional
const optionalValue: any | undefined = undefined;

someFunctionCall(true, true, false, optionalValue, true);

I would prefer to see param objects where they make sense for named variables.

// optional value not included.
// easier understanding of how flags are set.
someFunctionCall({
  optionA: true,
  optionB: true,
  optionC: false,
  optionD: true,
});

Places to consider

  • LiveObjectSynchronizer.start()
  • LiveMediaSession_Synchronizer.spec.getObjects()
  • LivePresence.updateInternal()
  • TODO: Definitely are more

huntj88 avatar Feb 06 '24 23:02 huntj88