diff options
author | James Maa <jmaa@berkeley.edu> | 2024-05-09 15:42:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-09 07:42:35 +0000 |
commit | 13278a5cf67de69678d8c4c5fb97e6eb00c94c11 (patch) | |
tree | 1d77bcf97bb9c6f08c88c9f80ea0da735d5721c2 /test/dom-text-scanner.test.js | |
parent | 77fa1d0f64b66d6e4fe9c8795c7844206edbcaf2 (diff) |
Update eslint unsafe rule (#887)
* Enable @typescript-eslint/no-unsafe-assignment
* Updates
* Add missing import
* Updates
* Fix types?
* Fix tests
* Address comments
* Move TextProcessorVariant to types
* Update types/ext/translation-internal.d.ts
Co-authored-by: StefanVukovic99 <stefanvukovic44@gmail.com>
Signed-off-by: James Maa <jmaa@berkeley.edu>
---------
Signed-off-by: James Maa <jmaa@berkeley.edu>
Co-authored-by: toasted-nutbread <toasted-nutbread@users.noreply.github.com>
Co-authored-by: StefanVukovic99 <stefanvukovic44@gmail.com>
Diffstat (limited to 'test/dom-text-scanner.test.js')
-rw-r--r-- | test/dom-text-scanner.test.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/dom-text-scanner.test.js b/test/dom-text-scanner.test.js index b366cadd..4ec3a44d 100644 --- a/test/dom-text-scanner.test.js +++ b/test/dom-text-scanner.test.js @@ -85,8 +85,13 @@ function createAbsoluteGetComputedStyle(window) { return (element, ...args) => { const style = getComputedStyleOld(element, ...args); return new Proxy(style, { + /** + * @param {CSSStyleDeclaration} target + * @param {string|symbol} property + * @returns {unknown} + */ get: (target, property) => { - let result = /** @type {import('core').SafeAny} */ (target)[property]; + let result = /** @type {Record<string|symbol, unknown>} */ (/** @type {unknown} */ (target))[property]; if (typeof result === 'string') { /** * @param {string} g0 |