mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-04-29 00:44:32 +00:00
Return intersection type when indexing IDocumentService (#10267)
Typescript 2.0 starts checking the compatibility of the index signature with the base JQuery interface; Hence we are forced to return Document & HTMLElement to be compatible with the base.
This commit is contained in:
committed by
Masahiro Wakame
parent
7d6547a8a0
commit
060060dc34
3
angularjs/angular.d.ts
vendored
3
angularjs/angular.d.ts
vendored
@@ -986,7 +986,8 @@ declare namespace angular {
|
||||
// see http://docs.angularjs.org/api/ng.$document
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IDocumentService extends JQuery {
|
||||
[index: number]: Document;
|
||||
// Must return intersection type for index signature compatibility with JQuery
|
||||
[index: number]: HTMLElement & Document;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user