derbyjs / racer

Realtime model synchronization engine for Node.js
1.18k stars 116 forks source link

Add additional signature for Model#filter that doesn't use var-args #281

Closed mskeving closed 3 years ago

mskeving commented 3 years ago

The var-args for additionalInputPaths in Model#filter make it difficult to write TypeScript type definitions.

These backwards-compatible changes add alternative signatures to allow array of additionalInputPaths.

model.filter(inPath1, inPath2, inPath3, ..., fn);  // Old
model.filter(inPath1, [inPath2, inPath3, ...], fn); // New
ericyhwang commented 3 years ago

Published in racer@0.9.16