This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +1766
-1774
lines changed Expand file tree Collapse file tree 3 files changed +1766
-1774
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,11 @@ limitations under the License.
15
15
*/
16
16
17
17
import EventEmitter from "events" ;
18
- import ResizeObserver from 'resize-observer-polyfill' ;
18
+ // XXX: resize-observer-polyfill has types that now conflict with typescript's
19
+ // own DOM types: https://github.com/que-etc/resize-observer-polyfill/issues/80
20
+ // Using require here rather than import is a horrenous workaround. We should
21
+ // be able to remove the polyfill once Safari 14 is released.
22
+ const ResizeObserverPolyfill = require ( 'resize-observer-polyfill' ) ; // eslint-disable-line @typescript-eslint/no-var-requires
19
23
import ResizeObserverEntry from 'resize-observer-polyfill/src/ResizeObserverEntry' ;
20
24
21
25
export enum UI_EVENTS {
@@ -43,7 +47,7 @@ export default class UIStore extends EventEmitter {
43
47
// eslint-disable-next-line no-restricted-properties
44
48
this . windowHeight = window . innerHeight ;
45
49
46
- this . resizeObserver = new ResizeObserver ( this . resizeObserverCallback ) ;
50
+ this . resizeObserver = new ResizeObserverPolyfill ( this . resizeObserverCallback ) ;
47
51
this . resizeObserver . observe ( document . body ) ;
48
52
}
49
53
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
14
14
limitations under the License.
15
15
*/
16
16
17
- import zxcvbn from 'zxcvbn' ;
17
+ import zxcvbn , { ZXCVBNFeedbackWarning } from 'zxcvbn' ;
18
18
19
19
import { MatrixClientPeg } from '../MatrixClientPeg' ;
20
20
import { _t , _td } from '../languageHandler' ;
@@ -84,7 +84,7 @@ export function scorePassword(password: string) {
84
84
}
85
85
// and warning, if any
86
86
if ( zxcvbnResult . feedback . warning ) {
87
- zxcvbnResult . feedback . warning = _t ( zxcvbnResult . feedback . warning ) ;
87
+ zxcvbnResult . feedback . warning = _t ( zxcvbnResult . feedback . warning ) as ZXCVBNFeedbackWarning ;
88
88
}
89
89
90
90
return zxcvbnResult ;
You can’t perform that action at this time.
0 commit comments