@@ -10,17 +10,8 @@ interface Site {
10
10
message : string ;
11
11
date : string ;
12
12
} ;
13
- StrongSocket : {
14
- // file://./../../site/src/socket.ts
15
- new ( url : string , version : number | false , cfg ?: any ) : any ;
16
- firstConnect : Promise < ( tpe : string , data : any ) => void > ;
17
- defaultParams : Record < string , any > ;
18
- } ;
19
13
mousetrap : LichessMousetrap ; // file://./../../site/src/mousetrap.ts
20
14
sri : string ;
21
- storage : LichessStorageHelper ;
22
- tempStorage : LichessStorageHelper ;
23
- once ( key : string , mod ?: 'always' ) : boolean ;
24
15
powertip : LichessPowertip ; // file://./../../site/src/powertip.ts
25
16
clockWidget ( el : HTMLElement , opts : { time : number ; pause ?: boolean } ) : void ;
26
17
spinnerHtml : string ;
@@ -42,10 +33,10 @@ interface Site {
42
33
pubsub : Pubsub ; // file://./../../site/src/pubsub.ts
43
34
unload : { expected : boolean } ;
44
35
redirect ( o : RedirectTo , beep ?: boolean ) : void ;
45
- reload ( ) : void ;
36
+ reload ( err ?: any ) : void ;
46
37
watchers ( el : HTMLElement ) : void ;
47
38
announce ( d : LichessAnnouncement ) : void ;
48
- trans ( i18n : I18nDict ) : Trans ;
39
+ trans : Trans ;
49
40
sound : SoundI ; // file://./../../site/src/sound.ts
50
41
miniBoard : {
51
42
// file://./../../common/src/miniBoard.ts
@@ -200,7 +191,7 @@ declare type SocketSend = (type: string, data?: any, opts?: any, noRetry?: boole
200
191
type TransNoArg = ( key : string ) => string ;
201
192
202
193
interface Trans {
203
- // file://./../../site /src/trans.ts
194
+ // file://./../../common /src/trans.ts
204
195
( key : string , ...args : Array < string | number > ) : string ;
205
196
noarg : TransNoArg ;
206
197
plural ( key : string , count : number , ...args : Array < string | number > ) : string ;
@@ -218,36 +209,6 @@ interface Pubsub {
218
209
emit ( msg : string , ...args : any [ ] ) : void ;
219
210
}
220
211
221
- interface LichessStorageHelper {
222
- make ( k : string , ttl ?: number ) : LichessStorage ;
223
- boolean ( k : string ) : LichessBooleanStorage ;
224
- get ( k : string ) : string | null ;
225
- set ( k : string , v : string ) : void ;
226
- fire ( k : string , v ?: string ) : void ;
227
- remove ( k : string ) : void ;
228
- }
229
-
230
- interface LichessStorage {
231
- get ( ) : string | null ;
232
- set ( v : any ) : void ;
233
- remove ( ) : void ;
234
- listen ( f : ( e : LichessStorageEvent ) => void ) : void ;
235
- fire ( v ?: string ) : void ;
236
- }
237
-
238
- interface LichessBooleanStorage {
239
- get ( ) : boolean ;
240
- getOrDefault ( defaultValue : boolean ) : boolean ;
241
- set ( v : boolean ) : void ;
242
- toggle ( ) : void ;
243
- }
244
-
245
- interface LichessStorageEvent {
246
- sri : string ;
247
- nonce : number ;
248
- value ?: string ;
249
- }
250
-
251
212
interface LichessAnnouncement {
252
213
msg ?: string ;
253
214
date ?: string ;
0 commit comments