-
Notifications
You must be signed in to change notification settings - Fork 74
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
fix(daemon): Strengthen type checks #1832
Conversation
535063a
to
12835ec
Compare
12835ec
to
14d1abc
Compare
acks: AsyncSpring<IteratorResult<TRead, TReadReturn>>, | ||
data: AsyncSink<IteratorResult<TWrite, TWriteReturn>>, |
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.
I imagine @mhofman will be interested in this relaxation of the signature of makeStream
. This is a remnant of the pubsub work. Although we’re not pursuing that variety of pubsub, this does make the type signature of makeStream
no more specific than necessary, which I think is good POLA.
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.
🎉
/** | ||
* @param {object} args | ||
* @param {string} args.path | ||
* @param {Promise<unknown>} args.cancelled |
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.
inconsistent types (see comment above)
here Promise<unknown>
* @param {object} args | ||
* @param {number} args.port | ||
* @param {string} [args.host] | ||
* @param {Promise<never>} args.cancelled |
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.
inconsistent types (see comment below)
here Promise<never>
14d1abc
to
2f8aa51
Compare
Evidently type checks have drifted because
@ts-check
comments are for some reason not redundant with"checkJs": true
as advertised. This change gets ts-check to pass for all the daemon sources.