Making publishOnce and stream types consistent?#34
Open
ceigey wants to merge 3 commits intojamauro:mainfrom
Open
Making publishOnce and stream types consistent?#34ceigey wants to merge 3 commits intojamauro:mainfrom
ceigey wants to merge 3 commits intojamauro:mainfrom
Conversation
Fixing a typo in pub-sub.d.ts that caused publishOnce to trigger tsc errors in a Meteor project.
Fix return type of publishOnce function
Owner
|
Thanks @ceigey!
I agree. Any interest in updating this PR to include 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.
I'm not sure if I've done this correctly but I noticed an issue with the
publishOncetype (seemingly missing a parenthesis) and tried fixing it in slightly contradictory ways (check the commit history). In the end I just made the type consistent withstreambut I'm not sure that's how it's meant to be, looking at the actual use cases.Perhaps the
voidI've got there should be anany, to make things a bit neater..meteor/local/types/node_modules/package-types/jam_pub-sub/package/web.cordova/pub-sub.d.ts:38:76 - error TS1005: '=>' expected. 38 export declare function publishOnce(name: string, handler: (...args: any[]): { [collectionName: string]: object[] }; ~ .meteor/local/types/node_modules/package-types/jam_pub-sub/package/web.cordova/pub-sub.d.ts:38:95 - error TS1005: ']' expected. 38 export declare function publishOnce(name: string, handler: (...args: any[]): { [collectionName: string]: object[] }; ~ .meteor/local/types/node_modules/package-types/jam_pub-sub/package/web.cordova/pub-sub.d.ts:38:103 - error TS1005: ',' expected. 38 export declare function publishOnce(name: string, handler: (...args: any[]): { [collectionName: string]: object[] }; ~ .meteor/local/types/node_modules/package-types/jam_pub-sub/package/web.cordova/pub-sub.d.ts:38:104 - error TS1128: Declaration or statement expected. 38 export declare function publishOnce(name: string, handler: (...args: any[]): { [collectionName: string]: object[] }; ~ .meteor/local/types/node_modules/package-types/jam_pub-sub/package/web.cordova/pub-sub.d.ts:38:113 - error TS1011: An element access expression should take an argument. 38 export declare function publishOnce(name: string, handler: (...args: any[]): { [collectionName: string]: object[] }; .meteor/local/types/node_modules/package-types/jam_pub-sub/package/web.cordova/pub-sub.d.ts:38:115 - error TS1128: Declaration or statement expected. 38 export declare function publishOnce(name: string, handler: (...args: any[]): { [collectionName: string]: object[] }; ~Ideally the types would better match the intended usage. Of which there seems to be...