Skip to content

Commit bdba636

Browse files
committed
Collection: add type-level tests for drop
1 parent e64a959 commit bdba636

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/effect-mongodb/dtslint/Collection.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import * as FindCursor from "effect-mongodb/FindCursor"
44
import * as F from "effect/Function"
55
import * as Schema from "effect/Schema"
66

7+
// TODO: try to use class Schema to improve test assertions
78
const MyType = Schema.Struct({
89
birthday: Schema.Date
910
})
@@ -133,3 +134,13 @@ Collection.rename(collection, "new-collection")
133134

134135
// $ExpectType Effect<Collection<{ readonly birthday: Date; }, { readonly birthday: string; }, never>, MongoError, never>
135136
F.pipe(collection, Collection.rename("new-collection"))
137+
138+
// -------------------------------------------------------------------------------------
139+
// drop
140+
// -------------------------------------------------------------------------------------
141+
142+
// $ExpectType Effect<boolean, MongoError, never>
143+
Collection.drop(collection)
144+
145+
// $ExpectType Effect<boolean, MongoError, never>
146+
F.pipe(collection, Collection.drop())

0 commit comments

Comments
 (0)