GeoffWillis

0

votes
1

answer
24

views

Thought I knew what this was

In the code snippet below, I am using a service (Angular) to extract text via a fileReader, using a promise for the async part. The issue I'm having is (I believe) a scope issue and am confused by it. In my component, I declare an instance variable: myDoc : docWrapperClass. Basically when the file...
GeoffWillis
0

votes
0

answer
7

views

How to deal with FileReader returns either ArrayBuffer, or String in TypeScript

I have chased myself in a circle and now time to ask for help. I've got the following (Typescript) service that opens a file reader, and depending upon the file type, calls either readAsText(), or readAsArrayBuffer(). I have a wrapper class (MyDocument) for the text the fileReader will return, as we...
GeoffWillis