mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* [jquery] Add detailed deprecation notices. * [jquery] Add `jQuery.nodeName()`. * [sizzle] Add named interfaces for `Selectors` properties. * [jquery] Add `jQuery.expr`. * [jquery] Add `jQuery.easing`. * [jquery] Improve formatting of `@deprecated` tags. WebStorm will not add padding between the description and deprecated text. To improve readability, a zero-width space and space is added to deprecated text to force padding. VS Code will collapse white space causing detailed deprecation notices to start adjacent to the `@deprecated` tag if there is no header. A minimal header is added where necessary. WebStorm renders line breaks in JSDoc. This may cause unintentional wrapping of text for `@deprecated` tags. To avoid this, line breaks are not used in deprecated text unless it's intended to render a line break there. This also fixes broken non-http `@link` tags and ensures that they render consistently.
93 lines
2.7 KiB
TypeScript
93 lines
2.7 KiB
TypeScript
// Type definitions for sizzle 2.3
|
|
// Project: https://sizzlejs.com
|
|
// Definitions by: Leonard Thieu <https://github.com/leonard-thieu>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.3
|
|
|
|
export as namespace Sizzle;
|
|
|
|
declare const Sizzle: SizzleStatic;
|
|
export = Sizzle;
|
|
|
|
interface SizzleStatic {
|
|
selectors: Sizzle.Selectors;
|
|
<TArrayLike extends ArrayLike<Element>>(selector: string, context: Element | Document | DocumentFragment, results: TArrayLike): TArrayLike;
|
|
(selector: string, context?: Element | Document | DocumentFragment): Element[];
|
|
// tslint:disable-next-line:ban-types
|
|
compile(selector: string): Function;
|
|
matchSelector(element: Element, selector: string): boolean;
|
|
matches(selector: string, elements: Element[]): Element[];
|
|
}
|
|
|
|
declare namespace Sizzle {
|
|
interface Selectors {
|
|
cacheLength: number;
|
|
match: Selectors.Matches;
|
|
find: Selectors.FindFunctions;
|
|
preFilter: Selectors.PreFilterFunctions;
|
|
filter: Selectors.FilterFunctions;
|
|
attrHandle: Selectors.AttrHandleFunctions;
|
|
pseudos: Selectors.PseudoFunctions;
|
|
setFilters: Selectors.SetFilterFunctions;
|
|
createPseudo(fn: Selectors.CreatePseudoFunction): Selectors.PseudoFunction;
|
|
}
|
|
|
|
namespace Selectors {
|
|
interface Matches {
|
|
[name: string]: RegExp;
|
|
}
|
|
|
|
interface FindFunction {
|
|
(match: RegExpMatchArray, context: Element | Document, isXML: boolean): Element[] | void;
|
|
}
|
|
|
|
interface FindFunctions {
|
|
[name: string]: FindFunction;
|
|
}
|
|
|
|
interface PreFilterFunction {
|
|
(match: RegExpMatchArray): string[];
|
|
}
|
|
|
|
interface PreFilterFunctions {
|
|
[name: string]: PreFilterFunction;
|
|
}
|
|
|
|
interface FilterFunction {
|
|
(element: string, ...matches: string[]): boolean;
|
|
}
|
|
|
|
interface FilterFunctions {
|
|
[name: string]: FilterFunction;
|
|
}
|
|
|
|
interface AttrHandleFunction {
|
|
(elem: any, casePreservedName: string, isXML: boolean): string;
|
|
}
|
|
|
|
interface AttrHandleFunctions {
|
|
[name: string]: AttrHandleFunction;
|
|
}
|
|
|
|
interface PseudoFunction {
|
|
(elem: Element): boolean;
|
|
}
|
|
|
|
interface PseudoFunctions {
|
|
[name: string]: PseudoFunction;
|
|
}
|
|
|
|
interface SetFilterFunction {
|
|
(elements: Element[], argument: number, not: boolean): Element[];
|
|
}
|
|
|
|
interface SetFilterFunctions {
|
|
[name: string]: SetFilterFunction;
|
|
}
|
|
|
|
interface CreatePseudoFunction {
|
|
(...args: any[]): PseudoFunction;
|
|
}
|
|
}
|
|
}
|