@@ -68,6 +68,7 @@ export class Visit {
6868 // ugh..
6969 toJObject ( ) : any {
7070 const o = { }
71+ // $FlowFixMe[prop-missing]
7172 Object . assign ( o , this )
7273 // $FlowFixMe
7374 o . time = o . time . getTime ( )
@@ -81,6 +82,7 @@ export class Visit {
8182 o . dt_local = new Date ( o . dt_local )
8283 // $FlowFixMe
8384 const v = new Visit ( )
85+ // $FlowFixMe[prop-missing]
8486 Object . assign ( v , o )
8587 return v
8688 }
@@ -142,7 +144,10 @@ export class Visits {
142144 // NOTE: JSON.stringify will use this method
143145 toJObject ( ) : any {
144146 const o = { }
147+ // $FlowFixMe[prop-missing]
145148 Object . assign ( o , this )
149+ // $FlowFixMe[prop-missing]
150+ // $FlowFixMe[incompatible-use]
146151 o . visits = o . visits . map ( v => {
147152 return ( v instanceof Visit )
148153 ? v . toJObject ( )
@@ -153,6 +158,7 @@ export class Visits {
153158 }
154159
155160 static fromJObject ( o : any ) : Visits {
161+ // $FlowFixMe[prop-missing]
156162 o . visits = o . visits . map ( x => {
157163 const err = x . error
158164 if ( err != null ) {
@@ -164,8 +170,10 @@ export class Visits {
164170 return Visit . fromJObject ( x )
165171 }
166172 } )
173+ // $FlowFixMe[prop-missing]
167174 // $FlowFixMe
168175 const r = new Visits ( )
176+ // $FlowFixMe[prop-missing]
169177 Object . assign ( r , o )
170178 return r
171179 }
@@ -205,7 +213,7 @@ export type SearchPageParams = {
205213}
206214
207215// $FlowFixMe
208- export function log ( ) {
216+ export function log ( ) : void {
209217 const args = [ ] ;
210218 for ( var i = 1 ; i < arguments . length ; i ++ ) {
211219 const arg = arguments [ i ] ;
@@ -219,13 +227,13 @@ export function asList(bl: string): Array<string> {
219227 return bl . split ( / \n / ) . filter ( s => s . length > 0 ) ;
220228}
221229
222- export function addStyle ( doc : Document , css : string ) {
230+ export function addStyle ( doc : Document , css : string ) : void {
223231 const st = doc . createElement ( 'style' ) ;
224232 st . appendChild ( doc . createTextNode ( css ) ) ;
225233 unwrap ( doc . head ) . appendChild ( st ) ;
226234}
227235
228- export function safeSetInnerHTML ( element : HTMLElement , html : string ) {
236+ export function safeSetInnerHTML ( element : HTMLElement , html : string ) : void {
229237 const tags = new DOMParser ( )
230238 . parseFromString ( html , 'text/html' )
231239 . getElementsByTagName ( 'body' ) [ 0 ]
@@ -289,6 +297,7 @@ export function rejectIfHttpError(response: HttpResponse): HttpResponse {
289297}
290298
291299// todo ugh, need to use some proper type annotations?
300+ // $FlowFixMe[missing-local-annot]
292301function fetch_typed ( ...args ) : Promise < HttpResponse > {
293302 // $FlowFixMe
294303 return fetch ( ...args )
0 commit comments