microsoft / live-share-sdk

A framework for building collaborative Microsoft Teams and M365 experiences.
Other
94 stars 29 forks source link

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

Open huntj88 opened 6 months ago

huntj88 commented 6 months ago

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