TSLint: re-enable callable-types rule

This rule specifies that if an interface defines a simple function, it
should be represented as a `type` rather than an `interface`.
This commit is contained in:
glacambre 2019-04-02 06:16:00 +02:00
parent efdee3c4e8
commit f2630ea047
No known key found for this signature in database
GPG key ID: B9625DB1767553AC
2 changed files with 2 additions and 8 deletions

View file

@ -144,9 +144,7 @@ export function* elementsByXPath(xpath, parent?) {
}
/** Type for functions that can filter element arrays */
interface ElementFilter {
(element: Element): boolean
}
type ElementFilter = (element: Element) => boolean
/** Is the element of "substantial" size and shown on the page. The element
* doesn't need to be in the viewport. This is useful when you want to
@ -323,10 +321,7 @@ export function getSelector(e: HTMLElement) {
* @param filters filter to use (in thre given order) to further chose
* items, or [] for all
*/
export function getElemsBySelector(
selector: string,
filters: ElementFilter[],
) {
export function getElemsBySelector(selector: string, filters: ElementFilter[]) {
let elems = Array.from(document.querySelectorAll(selector))
let frameElems = getAllDocumentFrames().reduce((acc, frame) => {
let newElems = []

View file

@ -3,7 +3,6 @@
"rules": {
"align": false,
"arrow-parens": false,
"callable-types": false,
"class-name": false,
"cognitive-complexity": false,
"comment-format": false,