Instead of using strings for options, personally I would prefer javascript objects with properties and values, so I wouldn't have to memorize the string options, but have intellisense take care of that.
For instance:
var rateLimitMethods = {
notifyAtFixedRate: "notifyAtFixedRate",
notifyWhenChangesStop: "notifyWhenChangesStop"
}
Hi,
Just an idea:
Instead of using strings for options, personally I would prefer javascript objects with properties and values, so I wouldn't have to memorize the string options, but have intellisense take care of that.
For instance:
var rateLimitMethods = { notifyAtFixedRate: "notifyAtFixedRate", notifyWhenChangesStop: "notifyWhenChangesStop" }
Would allow for:
someObservableOrComputed.extend({ rateLimit: { timeout: 500, method: rateLimitMethods.notifyWhenChangesStop } });