mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
Extend Angular jqLite static interface
This commit is contained in:
@@ -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 {
|
||||
|
||||
3
types/angular/jqlite.d.ts
vendored
3
types/angular/jqlite.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user