File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -64,24 +64,21 @@ export default class StreamProcessor extends ShellApiWithMongoClass {
6464 * sp.name.modify(newPipeline)
6565 * Keep the same pipeline, change other options:
6666 * sp.name.modify({resumeFromCheckpoint: false})
67+ * Change the pipeline and set additional options:
68+ * sp.name.modify(newPipeline, {resumeFromCheckpoint: false})
6769 */
6870 async modify ( options : Document ) : Promise < Document > ;
6971 async modify ( pipeline : Document [ ] , options ?: Document ) : Promise < Document > ;
7072
71- /**
72- * modify is used to modify a stream processor definition, like below:
73- * Change the pipeline and set additional options:
74- * sp.name.modify(newPipeline, {resumeFromCheckpoint: false})
75- */
7673 @returnsPromise
7774 async modify (
7875 pipelineOrOptions : Document [ ] | Document ,
79- options : Document = { }
76+ options ? : Document
8077 ) : Promise < Document > {
8178 if ( Array . isArray ( pipelineOrOptions ) ) {
8279 options = { ...options , pipeline : pipelineOrOptions } ;
8380 } else if ( typeof pipelineOrOptions === 'object' ) {
84- if ( Object . keys ( options ) . length !== 0 ) {
81+ if ( options ) {
8582 throw new MongoshInvalidInputError (
8683 'If the first argument to modify is an object, the second argument should not be specified.' ,
8784 CommonErrors . InvalidArgument
You can’t perform that action at this time.
0 commit comments