Extend Angular jqLite static interface

This commit is contained in:
Andre Wiggins
2017-06-27 16:01:43 -07:00
parent 40142ae748
commit d9d3759064
2 changed files with 6 additions and 3 deletions

View File

@@ -627,11 +627,13 @@ function test_angular_forEach() {
}
// angular.element() tests
let element = angular.element('div.myApp');
let element = angular.element('<div></div>');
let scope: ng.IScope = element.scope();
let isolateScope: ng.IScope = element.isolateScope();
isolateScope = element.find('div.foo').isolateScope();
isolateScope = element.find('div').isolateScope();
isolateScope = element.children().isolateScope();
let element2 = angular.element(element);
let elementArray = angular.element(document.querySelectorAll('div'));
// $timeout signature tests
namespace TestTimeout {

View File

@@ -20,6 +20,7 @@
// Dick van den Brink <https://github.com/DickvdBrink>
// Thomas Schulz <https://github.com/King2500>
// Leonard Thieu <https://github.com/leonard-thieu>
// Andre Wiggins <https://github.com/andrewiggins>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Definitions copied from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0480c5ec87fab41aa23047a02b27f0ea71aaf975/types/jquery/v2/index.d.ts
@@ -666,7 +667,7 @@ interface JQuery {
}
interface JQueryStatic {
(element: string | Element | Document): JQuery;
(element: string | Element | Document | JQuery | ArrayLike<Element>): JQuery;
}
/**