Open danparm opened 3 years ago
@danparm - I am happy to make an update, if we can figure out the issue. I’ll try to run it with 3.5 when I have a chance here. Do you get an error or how is the best way to see the problem? Thanks!
@rniemeyer I’ll try running 3.5 again locally. It’s really a two headed problem for me at the moment. I’m having to update the KO types in my source files since the names changed with the internal typing move. Will report back
One of the errors occurs when accessing postbox on the KO object: ko.postbox.publish(...); for example (TS) Property 'postbox' does not exist on type 'typeof import("/node_modules/knockout/build/types/knockout")
Then there's the issue of the interface properties. publishOn() for example throws a TS error because it doesn't exist on Observable
I'm no Typescript guru but would a change to the interface names in the postbox types likely solve the problem?
I may have something but need to step away for a minute. Extending the KO types with the postbox types seemed to work for part of the issue.
Alright, probably didn't have to rename the interfaces but extending the internal KO types I was able to clear all the errors in one TS file (also after updating the KO types in that file to work with the new names).
Just need to work on cleaning this up:
Hit a wall with this though:
This is where I'm running out of Typescript skills.
Updated my (postbox as KnockoutPostBox) to and export const pb: KnockoutPostBox in the postbox types.
Of course all of this is untested because I can't build my JS.
Looks like with the change to internal types with KO 3.5 there's now a conflict with KO Postbox requiring the external KO types. I'll do some more investigating but seeing as this project hasn't had an update in 4 years I will likely look for another solution.