I'm sure that
Script type
TypeScript
The problem
My scripts heavily rely on rxjs. I need to use rxjs 6.x because newer versions don't work with ioBroker.javascript.
ioBroker.javascript 9.3.1 with rxjs@6 installed works fine with this piece of simplistic code:
import { Observable } from 'rxjs';
new Observable<string>(observer => { })
The code compiles and runs, despite the observer type not being inferred.
Not an issue for me because I write my scripts in VS Code:
With ioBroker.javascript 10, the same code no longer compiles:
TypeScript compilation failed:
new Observable<string>(observer => { });
^
ERROR: Parameter 'observer' implicitly has an 'any' type.
With explicit types, compilation does succeed (VS Code accepts it too, so does tsc):
import { Observable, Subscriber } from 'rxjs';
new Observable<string>((observer: Subscriber<string>) => {});
Why does type inference no longer work and now cause compiler errors?
iobroker.current.log (in debug mode!)
No response
Version of nodejs
22.22
Version of ioBroker js-controller
7.2.2
Version of adapter
10.0.0
I'm sure that
Script type
TypeScript
The problem
My scripts heavily rely on rxjs. I need to use rxjs 6.x because newer versions don't work with ioBroker.javascript.
ioBroker.javascript 9.3.1 with
rxjs@6installed works fine with this piece of simplistic code:The code compiles and runs, despite the
observertype not being inferred.Not an issue for me because I write my scripts in VS Code:
With ioBroker.javascript 10, the same code no longer compiles:
With explicit types, compilation does succeed (VS Code accepts it too, so does
tsc):Why does type inference no longer work and now cause compiler errors?
iobroker.current.log (in debug mode!)
No response
Version of nodejs
22.22
Version of ioBroker js-controller
7.2.2
Version of adapter
10.0.0