-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add flow types #43
Conversation
These are incomplete, but cover common surface area.
distinct<FieldType>(field: string, query: Query): Promise<FieldType[]>; | ||
insert: typeof Collection.prototype.insertOne & typeof Collection.prototype.insertMany; | ||
insertOne<Doc>(doc: Doc, options?: InsertOptions): Promise<$Call<AddObjectIDField, Doc>>; | ||
insertMany<Docs>(docs: Docs, options?: InsertOptions): Promise<$TupleMap<Docs, AddObjectIDField>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. It'd be good to test these definitions on some sample codebases, to identify any usability/adoption issues.
When not readonly, these types can conflict due to contract-breaking object reference changes.
@@ -453,53 +451,66 @@ export type Projection = { | |||
... | |||
}; | |||
|
|||
type AggregationUpdate = ( | |||
type AggregationUpdate = $ReadOnlyArray< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
These are incomplete, but cover common surface area.
Also restricts published files:
Fixes #42