-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add more typing for history objects #277
Conversation
93a5e35
to
9f89a09
Compare
9f89a09
to
cb262d7
Compare
case DocumentKind.organizations: | ||
return 'Organization' | ||
default: | ||
return exhaustiveCheck(node.kind) |
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.
Don't know if there's a better way to do this!
@@ -49,7 +50,7 @@ const onChange = (change: ChangeStreamDocument): void => { | |||
case 'replace': | |||
case 'update': { | |||
let dbOp: DBOperation = 'update' | |||
const source = change.ns.coll | |||
const source = DocumentKind[change.ns.coll] |
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.
Hope this is fine. Dunno if we can type change.ns.coll
as well.
Thanks for the fix. In general I think we should prioritize climb & area history. As you said in the other comment the LCO edit feature will be used by very a few trusted individual. |
@all-contributors add @zichongkao @musoke for code & ideas |
I've put up a pull request to add @zichongkao! 🎉 |
kind
to be an enum instead of string.OrganizationType
as aSupportedCollectionType
.