Skip to content

Commit 4d12491

Browse files
authored
feat(NODE-3115): Add generic parameterization (#2767)
MongoClient, Db, Collection, and Cursors can now accept generic parameters to type check the usage of the various API methods on each class. Using generics is kept optional.
1 parent 1cdc8a8 commit 4d12491

37 files changed

+2378
-1645
lines changed

.eslintrc.json

+4
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,9 @@
5151
"files": ["*.mjs"],
5252
"parserOptions": {"sourceType": "module"}
5353

54+
},{
55+
"files": ["*.ts"],
56+
"parserOptions": {"sourceType": "module"}
57+
5458
}]
5559
}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ yarn.lock
5555
lib/
5656
*.tgz
5757
*.d.ts
58+
# type definition tests
59+
!test/types
5860

5961
.vscode
6062
output

CONTRIBUTORS.md

+99-51
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,101 @@
11
# Contributors
22

3-
- Christian Kvalheim
4-
- Matt Broadstone <<[email protected]>>
5-
- Dan Aprahamian <<[email protected]>>
6-
- Katherine Walker <<[email protected]>>
7-
- Aaron Heckmann
8-
- Christoph Pojer
9-
- Pau Ramon Revilla
10-
- Nathan White
11-
- Emmerman
12-
- Seth LaForge
13-
- Boris Filipov
14-
- Stefan Schärmeli
15-
- Tedde Lundgren
16-
- renctan
17-
- Sergey Ukustov
18-
- Ciaran Jessup
19-
- kuno
20-
- srimonti
21-
- Erik Abele
22-
- Pratik Daga
23-
- Slobodan Utvic
24-
- Kristina Chodorow
25-
- Yonathan Randolph
26-
- Brian Noguchi
27-
- Sam Epstein
28-
- James Harrison Fisher
29-
- Vladimir Dronnikov
30-
- Ben Hockey
31-
- Henrik Johansson
32-
- Simon Weare
33-
- Alex Gorbatchev
34-
- Shimon Doodkin
35-
- Kyle Mueller
36-
- Eran Hammer-Lahav
37-
- Marcin Ciszak
38-
- François de Metz
39-
- Vinay Pulim
40-
- nstielau
41-
- Adam Wiggins
42-
- entrinzikyl
43-
- Jeremy Selier
44-
- Ian Millington
45-
- Public Keating
46-
- andrewjstone
47-
- Christopher Stott
48-
- Corey Jewett
49-
- brettkiefer
50-
- Rob Holland
51-
- Senmiao Liu
52-
- heroic
53-
- gitfy
3+
- Christian Kvalheim
4+
- Matt Broadstone
5+
- Dan Aprahamian
6+
- Katherine Walker
7+
- Aaron Heckmann
8+
- Christoph Pojer
9+
- Pau Ramon Revilla
10+
- Nathan White
11+
- Emmerman
12+
- Seth LaForge
13+
- Boris Filipov
14+
- Stefan Schärmeli
15+
- Tedde Lundgren
16+
- renctan
17+
- Sergey Ukustov
18+
- Ciaran Jessup
19+
- kuno
20+
- srimonti
21+
- Erik Abele
22+
- Pratik Daga
23+
- Slobodan Utvic
24+
- Kristina Chodorow
25+
- Yonathan Randolph
26+
- Brian Noguchi
27+
- Sam Epstein
28+
- James Harrison Fisher
29+
- Vladimir Dronnikov
30+
- Ben Hockey
31+
- Henrik Johansson
32+
- Simon Weare
33+
- Alex Gorbatchev
34+
- Shimon Doodkin
35+
- Kyle Mueller
36+
- Eran Hammer-Lahav
37+
- Marcin Ciszak
38+
- François de Metz
39+
- Vinay Pulim
40+
- nstielau
41+
- Adam Wiggins
42+
- entrinzikyl
43+
- Jeremy Selier
44+
- Ian Millington
45+
- Public Keating
46+
- andrewjstone
47+
- Christopher Stott
48+
- Corey Jewett
49+
- brettkiefer
50+
- Rob Holland
51+
- Senmiao Liu
52+
- heroic
53+
- gitfy
54+
55+
## Maintainers
56+
57+
- Neal Beeken <<[email protected]>>
58+
- Eric Adum <<[email protected]>>
59+
- Durran Jordan <<[email protected]>>
60+
- Daria Pardue <<[email protected]>>
61+
62+
## Community Types
63+
64+
This release of the driver draws inspiration from the community contributed types to reduce upgrade friction as much as possible.
65+
We thank those listed below who contributed to the open source types, still available at `@types/mongodb` for versions prior to v4.
66+
67+
**Thank you!**
68+
69+
- Federico Caselli <https://github.com./CaselIT>
70+
- Alan Marcell <https://github.com./alanmarcell>
71+
- Gaurav Lahoti <https://github.com./dante-101>
72+
- Mariano Cortesi <https://github.com./mcortesi>
73+
- Enrico Picci <https://github.com./EnricoPicci>
74+
- Alexander Christie <https://github.com./AJCStriker>
75+
- Julien Chaumond <https://github.com./julien-c>
76+
- Dan Aprahamian <https://github.com./daprahamian>
77+
- Denys Bushulyak <https://github.com./denys-bushulyak>
78+
- Bastien Arata <https://github.com./BastienAr>
79+
- Wan Bachtiar <https://github.com./sindbach>
80+
- Geraldine Lemeur <https://github.com./geraldinelemeur>
81+
- Dominik Heigl <https://github.com./various89>
82+
- Angela-1 <https://github.com./angela-1>
83+
- Hector Ribes <https://github.com./hector7>
84+
- Florian Richter <https://github.com./floric>
85+
- Erik Christensen <https://github.com./erikc5000>
86+
- Nick Zahn <https://github.com./Manc>
87+
- Jarom Loveridge <https://github.com./jloveridge>
88+
- Luis Pais <https://github.com./ranguna>
89+
- Hossein Saniei <https://github.com./HosseinAgha>
90+
- Alberto Silva <https://github.com./albertossilva>
91+
- Piotr Błażejewicz <https://github.com./peterblazejewicz>
92+
- Linus Unnebäck <https://github.com./LinusU>
93+
- Richard Bateman <https://github.com./taxilian>
94+
- Igor Strebezhev <https://github.com./xamgore>
95+
- Valentin Agachi <https://github.com./avaly>
96+
- HitkoDev <https://github.com./HitkoDev>
97+
- TJT <https://github.com./Celend>
98+
- Julien TASSIN <https://github.com./jtassin>
99+
- Anna Henningsen <https://github.com./addaleax>
100+
- Emmanuel Gautier <https://github.com./emmanuelgautier>
101+
- Wyatt Johnson <https://github.com./wyattjoh>

0 commit comments

Comments
 (0)