While trying to implement TypeScript with my codebase, I run into this problem. It seems that the way I used to load jQuery and AngularJS in sequence, AngularJS would pick up on the presence of jQuery and extend itself with its functionality. However, when importing locally in a module, AngularJS gets loaded in isolation and cannot seem to extend itself with jQuery. Therefore, when I do something like this:
import * as $ from 'jquery';
import * as angular from 'angular';
export default ['$window', function($window) {
let position = angular.element($window).scrollTop();
}];
I get this TypeScript error:
Property 'scrollTop' does not exist on type 'JQLite'.
How can I load AngularJS in a way that it knows it can use jQuery and will extend itself with it?