({ explain }: ExplainOptions = {})
| 79 | } |
| 80 | |
| 81 | static fromOptions({ explain }: ExplainOptions = {}): Explain | undefined { |
| 82 | if (explain == null) return; |
| 83 | |
| 84 | if (typeof explain === 'boolean' || typeof explain === 'string') { |
| 85 | return new Explain(explain); |
| 86 | } |
| 87 | |
| 88 | const { verbosity, maxTimeMS } = explain; |
| 89 | return new Explain(verbosity, maxTimeMS); |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | export function validateExplainTimeoutOptions(options: Document, explain?: Explain) { |
no outgoing calls
no test coverage detected