Try rewriting this so that:
- every parameter and return type of each function has a declared type (not
any
); - the keyword
new
does not appear; - you never modify any external state (which disqualifies what you are doing with
this.fileFids
) - no writing to any properties ofthis
; - the first word of any function returning a future (
Promise
orObservable
) must bereturn
These rules may seem arbitrary, but I have found them relentlessly effective in stripping away bugs of the type you seem to have here.