Merge pull request #28975 from leonard-thieu/jquery/symbol-forward-declaration

[jquery] Fix issue with resolving `Symbol` when used with ES5.
This commit is contained in:
Jesse Trinity
2018-09-18 10:28:59 -07:00
committed by GitHub
+14 -1
View File
@@ -5855,10 +5855,23 @@ interface JQuery<TElement = HTMLElement> extends Iterable<TElement> {
[n: number]: TElement;
}
// ES5 compatibility
// #region ES5 compatibility
// tslint:disable-next-line:no-empty-interface
interface Iterable<T> { }
interface SymbolConstructor {
/**
* A String value that is used in the creation of the default string description of an object.
* Called by the built-in method Object.prototype.toString.
*/
readonly toStringTag: symbol;
}
declare var Symbol: SymbolConstructor;
// #endregion
declare namespace JQuery {
type TypeOrArray<T> = T | T[];
type Node = Element | Text | Comment | DocumentFragment;