You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
internal/types.d.ts(38,13): Property 'observable' does not exist on type 'SymbolConstructor'. #3674
Upgrading to the latest node-typings to get @phra's change introducing a new error:
ERROR in node_modules/rxjs/internal/symbol/observable.d.ts(4,9): error TS2687: All declarations of 'observable' must have identical modifiers.
node_modules/@types/node/index.d.ts(167,14): error TS2687: All declarations of 'observable' must have identical modifiers.
@swimmadude66 i was not having that problem. it seems like that one of your imported type declaration it's re-declaring observable, declare in @types/node. can you debug your node_modules directory to find if there are multiple declarations of observable?
@phra my only types are @types/node, and a search for the string observable in node_modules/**/*.d.ts only finds those, rxjs, and angular/http. I'm not sure what changed that this log appeared in my build in the first place, but updating types/node makes the worse error
@swimmadude66 is maybe some angular/http recent version that was released later ? it can be that they tried to fix the issue on their side since they are heavily using observables in that module. at the moment i don't have time to debug since i don't have the issue.. what do you think about posting a repro code?
@phra I just did some digging and I think I figured it out. your fix for node typings added observable to symbol, but added it as readonly. The latest release of rxjs (6.2.0 at the time of this writing) has Symbol.observable declared without readonly causing the error I posted.
It appears that the readonly flag was added to Symbol.observable in e1c203f 7 days ago, but a release has yet to be drafted from master since. So I am going to just downgrade my node typings again and live with the warning until rxjs 6.2.1, at which point it appears it will be safe to include your fix.
@benlesh could I get an idea of a timeline on an upcoming patch to roll out this fix please?
Activity
benlesh commentedon May 21, 2018
Do you have a minimal reproduction?
phra commentedon May 25, 2018
@benlesh i've debugged the issue and it was related to nodejs typings.. i have fixed them in order to make the compilation work again.
see DefinitelyTyped/DefinitelyTyped#26034
benlesh commentedon May 26, 2018
Awesome, thanks @phra!
localyost3000 commentedon Jun 6, 2018
Upgrading to the latest node-typings to get @phra's change introducing a new error:
phra commentedon Jun 7, 2018
@swimmadude66 i was not having that problem. it seems like that one of your imported type declaration it's re-declaring
observable, declare in@types/node. can you debug yournode_modulesdirectory to find if there are multiple declarations ofobservable?localyost3000 commentedon Jun 7, 2018
@phra my only types are
@types/node, and a search for the stringobservableinnode_modules/**/*.d.tsonly finds those, rxjs, and angular/http. I'm not sure what changed that this log appeared in my build in the first place, but updating types/node makes the worse errorphra commentedon Jun 8, 2018
@swimmadude66 is maybe some
angular/httprecent version that was released later ? it can be that they tried to fix the issue on their side since they are heavily using observables in that module. at the moment i don't have time to debug since i don't have the issue.. what do you think about posting a repro code?localyost3000 commentedon Jun 8, 2018
@phra I just did some digging and I think I figured it out. your fix for node typings added
observabletosymbol, but added it asreadonly. The latest release of rxjs (6.2.0 at the time of this writing) hasSymbol.observabledeclared withoutreadonlycausing the error I posted.It appears that the
readonlyflag was added toSymbol.observablein e1c203f 7 days ago, but a release has yet to be drafted from master since. So I am going to just downgrade my node typings again and live with the warning until rxjs 6.2.1, at which point it appears it will be safe to include your fix.@benlesh could I get an idea of a timeline on an upcoming patch to roll out this fix please?
phra commentedon Jun 8, 2018
@swimmadude66 thanks for debugging it! 🎉 🎉
having the
readonlymodifier is for sure a good thing!localyost3000 commentedon Jun 8, 2018
for sure, thank you for actually pushing the fix!