File tree Expand file tree Collapse file tree 4 files changed +14
-12
lines changed
assets/js/phoenix_live_view Expand file tree Collapse file tree 4 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,9 @@ export default class LiveSocket {
8282 this . uploaders = opts . uploaders || { } ;
8383 this . loaderTimeout = opts . loaderTimeout || LOADER_TIMEOUT ;
8484 this . disconnectedTimeout = opts . disconnectedTimeout || DISCONNECTED_TIMEOUT ;
85+ /**
86+ * @type {ReturnType<typeof setTimeout> | null }
87+ */
8588 this . reloadWithJitterTimer = null ;
8689 this . maxReloads = opts . maxReloads || MAX_RELOADS ;
8790 this . reloadJitterMin = opts . reloadJitterMin || RELOAD_JITTER_MIN ;
Original file line number Diff line number Diff line change @@ -109,7 +109,13 @@ export default class View {
109109 this . ref = 0 ;
110110 this . lastAckRef = null ;
111111 this . childJoins = 0 ;
112+ /**
113+ * @type {ReturnType<typeof setTimeout> | null }
114+ */
112115 this . loaderTimer = null ;
116+ /**
117+ * @type {ReturnType<typeof setTimeout> | null }
118+ */
113119 this . disconnectedTimer = null ;
114120 this . pendingDiffs = [ ] ;
115121 this . pendingForms = new Set ( ) ;
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ export interface HookInterface {
154154 uploadTo ( selectorOrTarget : PhxTarget , name : any , files : any ) : any ;
155155
156156 // allow unknown methods, as people can define them in their hooks
157- [ key : string ] : any ;
157+ [ key : PropertyKey ] : any ;
158158}
159159
160160// based on https://github.com/DefinitelyTyped/DefinitelyTyped/blob/fac1aa75acdddbf4f1a95e98ee2297b54ce4b4c9/types/phoenix_live_view/hooks.d.ts#L26
@@ -204,7 +204,7 @@ export interface Hook<T = object> {
204204 reconnected ?: ( this : T & HookInterface ) => void ;
205205
206206 // Allow custom methods with any signature and custom properties
207- [ key : string ] : ( ( this : T & HookInterface , ... args : any [ ] ) => any ) | any ;
207+ [ key : PropertyKey ] : any ;
208208}
209209
210210/**
Original file line number Diff line number Diff line change 11{
22 "compilerOptions" : {
3- "target" : " es2016 " ,
3+ "target" : " es2021 " ,
44 "module" : " esnext" ,
55 "moduleResolution" : " node" ,
66 "allowJs" : true ,
1212 "baseUrl" : " ./assets/js" ,
1313 "stripInternal" : true ,
1414 "paths" : {
15- "*" : [
16- " *" ,
17- " phoenix_live_view/*"
18- ]
15+ "*" : [" *" , " phoenix_live_view/*" ]
1916 },
2017 "declaration" : true ,
2118 "emitDeclarationOnly" : true ,
2421 "include" : [
2522 " ./assets/js/phoenix_live_view/*.js" ,
2623 " ./assets/js/phoenix_live_view/*.ts"
27- ],
28- "exclude" : [
29- " node_modules" ,
30- " assets/test/**/*"
3124 ]
32- }
25+ }
You can’t perform that action at this time.
0 commit comments