Conversation
lerouxb
commented
Jun 18, 2025
| DownloadCenterConfig, | ||
| PlatformWithPackages, | ||
| } from '@mongodb-js/dl-center/dist/download-center-config'; | ||
| } from '@mongodb-js/dl-center'; |
Member
Author
There was a problem hiding this comment.
The new module resolution compiler option is not liking the /dist/ hack so I changed @mongodb-js/dl-center to just export the types.
lerouxb
commented
Jun 18, 2025
| import PlanCache from './plan-cache'; | ||
| import ChangeStreamCursor from './change-stream-cursor'; | ||
| import { ShellApiErrors } from './error-codes'; | ||
| import type * as mql from '@mongodb-js/mql-typescript/schema'; |
Member
Author
There was a problem hiding this comment.
This is why I'm changing the moduleResolution ts compiler option. I want to be able to import a separate export from the default one.
lerouxb
commented
Jun 25, 2025
| _mongo: Mongo<M>; | ||
| _name: StringKey<M>; | ||
| _collections: Record<StringKey<D>, CollectionWithSchema<M, D>>; | ||
| _collections: { [k in StringKey<D>]: CollectionWithSchema<M, D, D[k], k> }; |
Member
Author
There was a problem hiding this comment.
aah this was what I was looking for!
lerouxb
commented
Jun 25, 2025
| } | ||
|
|
||
| async _getConfigDB(): Promise<DatabaseWithSchema<M, M[keyof M]>> { | ||
| async _getConfigDB(): Promise<DatabaseWithSchema<M, M['config']>> { |
Member
Author
There was a problem hiding this comment.
I went back and forth on exactly this change and I seemed to just trade one set of errors for another. Although I agree that M['config'] is more correct - it is what I tried first.
lerouxb
commented
Jun 25, 2025
| export async function iterate( | ||
| results: CursorIterationResult, | ||
| cursor: AbstractCursor<any, any> | ChangeStreamCursor, | ||
| cursor: { isClosed(): boolean; tryNext(): Promise<Document | null> }, |
Member
Author
There was a problem hiding this comment.
Good idea to specify smaller types. Didn't consider that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.