mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
Fix #2624: add types for Ramda
This commit is contained in:
parent
b40c0ea242
commit
a119551ce8
6 changed files with 20 additions and 4 deletions
|
@ -20,6 +20,7 @@
|
|||
"@types/firefox-webext-browser": "^78.0.0",
|
||||
"@types/jest": "^26.0.4",
|
||||
"@types/node": "^14.0.23",
|
||||
"@types/ramda": "^0.27.11",
|
||||
"@types/selenium-webdriver": "^4.0.9",
|
||||
"@typescript-eslint/eslint-plugin": "^3.6.1",
|
||||
"@typescript-eslint/eslint-plugin-tslint": "^3.6.1",
|
||||
|
|
|
@ -166,7 +166,7 @@ config.addChangeListener("autocmds", (previous, current) =>
|
|||
const path = R.path([requestEvent, pattern])
|
||||
|
||||
// If this is a new autocmd, register it
|
||||
!R.equals(...R.map(path, [current, previous])) &&
|
||||
path(current) !== path(previous) &&
|
||||
webrequests.registerWebRequestAutocmd(
|
||||
requestEvent,
|
||||
pattern,
|
||||
|
|
|
@ -1017,7 +1017,9 @@ export function hintables(selectors = DOM.HINTTAGS_selectors, withjs = false) {
|
|||
hintables.push({
|
||||
elements: R.pipe(
|
||||
Array.from,
|
||||
R.filter(DOM.isVisible),
|
||||
// Ramda gives an error here without the "any"
|
||||
// Problem for a rainy day :)
|
||||
R.filter(DOM.isVisible) as any,
|
||||
R.without(elems),
|
||||
changeHintablesToLargestChild,
|
||||
)(DOM.hintworthy_js_elems),
|
||||
|
|
|
@ -25,7 +25,8 @@ import * as binding from "@src/lib/binding"
|
|||
const removeNull = R.when(
|
||||
R.is(Object),
|
||||
R.pipe(
|
||||
R.reject(val => val === null),
|
||||
// Ramda gives an error here without the any
|
||||
R.reject(val => val === null) as any,
|
||||
R.map(a => removeNull(a)),
|
||||
),
|
||||
)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "src/",
|
||||
"types": ["@types/firefox-webext-browser", "web-ext-types"],
|
||||
"types": ["@types/ramda", "@types/firefox-webext-browser", "web-ext-types"],
|
||||
"paths": {
|
||||
"@src/*": ["*"]
|
||||
}
|
||||
|
|
12
yarn.lock
12
yarn.lock
|
@ -752,6 +752,13 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.19.1.tgz#33509849f8e679e4add158959fdb086440e9553f"
|
||||
integrity sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ==
|
||||
|
||||
"@types/ramda@^0.27.11":
|
||||
version "0.27.11"
|
||||
resolved "https://registry.yarnpkg.com/@types/ramda/-/ramda-0.27.11.tgz#a2efedc1fecc0faa2d3530eb53cf468e219f7c51"
|
||||
integrity sha512-pojA0+wBhjMWfwZ1tAea/OdUqZxaRQOi/vHldthrOIEPdRQdJb/hvU4yM1uHKGTT89ZZpxe43KM1sq5YGxS5lw==
|
||||
dependencies:
|
||||
ts-toolbelt "^6.3.3"
|
||||
|
||||
"@types/selenium-webdriver@^4.0.9":
|
||||
version "4.0.9"
|
||||
resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-4.0.9.tgz#12621e55b2ef8f6c98bd17fe23fa720c6cba16bd"
|
||||
|
@ -8349,6 +8356,11 @@ ts-node@^8.10.2:
|
|||
source-map-support "^0.5.17"
|
||||
yn "3.1.1"
|
||||
|
||||
ts-toolbelt@^6.3.3:
|
||||
version "6.13.4"
|
||||
resolved "https://registry.yarnpkg.com/ts-toolbelt/-/ts-toolbelt-6.13.4.tgz#313a1a380341c99db3f669cb8cdbfd33354aa98f"
|
||||
integrity sha512-6DJVcjPYdgF0NR2G80vNrRAChgks16DQ/a49UzQOF9opMixAv61vCQcSUSKX64sXAf2OKqke0gapxtTZGE/qrg==
|
||||
|
||||
tsconfig-paths-webpack-plugin@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-3.2.0.tgz#6e70bd42915ad0efb64d3385163f0c1270f3e04d"
|
||||
|
|
Loading…
Add table
Reference in a new issue