diff --git a/src/cursor/aggregation_cursor.ts b/src/cursor/aggregation_cursor.ts index 2f293c852e..6efae2035c 100644 --- a/src/cursor/aggregation_cursor.ts +++ b/src/cursor/aggregation_cursor.ts @@ -120,8 +120,8 @@ export class AggregationCursor extends AbstractCursor(x => x.toString()); expectType>(composedMap); expectType(await composedMap.next()); expectType(await composedMap.toArray()); + +const builtCursor = coll.aggregate(); +expectType>(builtCursor.out('string')); // should allow string values for the out helper +expectError(builtCursor.out(1)); // should error on non-string values