@@ -18,7 +18,6 @@ limitations under the License.
1818
1919import Chainable = Cypress . Chainable ;
2020import type { SettingLevel } from "../../src/settings/SettingLevel" ;
21- import SettingsStore from "../../src/settings/SettingsStore" ;
2221
2322declare global {
2423 // eslint-disable-next-line @typescript-eslint/no-namespace
@@ -27,7 +26,7 @@ declare global {
2726 /**
2827 * Returns the SettingsStore
2928 */
30- getSettingsStore ( ) : Chainable < typeof SettingsStore | undefined > ;
29+ getSettingsStore ( ) : Chainable < any | undefined > ; // XXX: Importing SettingsStore causes a bunch of type lint errors
3130 /**
3231 * Open the top left user menu, returning a handle to the resulting context menu.
3332 */
@@ -101,7 +100,7 @@ declare global {
101100 }
102101}
103102
104- Cypress . Commands . add ( "getSettingsStore" , ( ) : Chainable < typeof SettingsStore > => {
103+ Cypress . Commands . add ( "getSettingsStore" , ( ) : Chainable < any > => {
105104 return cy . window ( { log : false } ) . then ( win => win . mxSettingsStore ) ;
106105} ) ;
107106
@@ -111,14 +110,14 @@ Cypress.Commands.add("setSettingValue", (
111110 level : SettingLevel ,
112111 value : any ,
113112) : Chainable < void > => {
114- return cy . getSettingsStore ( ) . then ( async ( store : typeof SettingsStore ) => {
113+ return cy . getSettingsStore ( ) . then ( async ( store : any ) => {
115114 return store . setValue ( name , roomId , level , value ) ;
116115 } ) ;
117116} ) ;
118117
119118Cypress . Commands . add ( "getSettingValue" , < T = any > ( name : string , roomId ?: string ) : Chainable < T > => {
120- return cy . getSettingsStore ( ) . then ( < T > ( store : typeof SettingsStore ) => {
121- return store . getValue < T > ( name , roomId ) ;
119+ return cy . getSettingsStore ( ) . then ( ( store : any ) => {
120+ return store . getValue ( name , roomId ) ;
122121 } ) ;
123122} ) ;
124123
0 commit comments