How do i import FileReader in typescript. I tried this:
var reader:FileReader = new FileReader();
my tsconfig.json
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"outDir": "out",
"lib": [
"es6"
],
"sourceMap": true,
"rootDir": "."
},
"exclude": [
"node_modules",
".vscode-test"
]
}
My error is cannot find name 'FileReader' I am unable to do this too:
import FileReader;

lib.dom.d.tsas seen here: github.com/Microsoft/TypeScript/blob/master/lib/… it should work without doing anything. If not, you can try to locate that file on your disk and use a triple-slash directive to force TypeScript to load it : typescriptlang.org/docs/handbook/triple-slash-directives.html but that would denote a flaw in your setup.