(options: Document, explain?: Explain)
| 91 | } |
| 92 | |
| 93 | export function validateExplainTimeoutOptions(options: Document, explain?: Explain) { |
| 94 | const { maxTimeMS, timeoutMS } = options; |
| 95 | if (timeoutMS != null && (maxTimeMS != null || explain?.maxTimeMS != null)) { |
| 96 | throw new MongoAPIError('Cannot use maxTimeMS with timeoutMS for explain commands.'); |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | /** |
| 101 | * Applies an explain to a given command. |
no outgoing calls
no test coverage detected