-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(TS) Add more types to Text, BREAKING: change return type of _ge…
…tStyleDeclaration (#9018)
- Loading branch information
Showing
16 changed files
with
158 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
//@ts-nocheck | ||
import { selectorMatches } from './selectorMatches'; | ||
|
||
export function doesSomeParentMatch(element, selectors) { | ||
let selector, | ||
export function doesSomeParentMatch(element: HTMLElement, selectors: string[]) { | ||
let selector: string, | ||
parentMatching = true; | ||
while ( | ||
element.parentNode && | ||
element.parentNode.nodeType === 1 && | ||
element.parentElement && | ||
element.parentElement.nodeType === 1 && | ||
selectors.length | ||
) { | ||
if (parentMatching) { | ||
selector = selectors.pop(); | ||
selector = selectors.pop()!; | ||
} | ||
element = element.parentNode; | ||
parentMatching = selectorMatches(element, selector); | ||
element = element.parentElement; | ||
parentMatching = selectorMatches(element, selector!); | ||
} | ||
return selectors.length === 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
//@ts-nocheck | ||
|
||
export function getSvgRegex(arr) { | ||
export function getSvgRegex(arr: string[]) { | ||
return new RegExp('^(' + arr.join('|') + ')\\b', 'i'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.