timbru31 edited a comment on issue #400:
URL: 
https://github.com/apache/cordova-plugin-file/issues/400#issuecomment-648819057


   This one works fine for us:
   
   ```json
   {
        "extends": "./tsconfig.json",
        "compilerOptions": {
                "outDir": "./out-tsc/app",
                "preserveConstEnums": true,
                "types": ["node", "cordova", "cordova-plugin-file", 
"cordova-plugin-lottie-splashscreen"]
        },
        "files": ["src/main.ts", "src/polyfills.ts"],
        "include": ["src/**/*.d.ts"]
   }
   ```
   
   Base `tsconfig.json` is:
   ```json
   {
        "compileOnSave": false,
        "compilerOptions": {
                "baseUrl": "./",
                "outDir": "./dist/out-tsc",
                "sourceMap": true,
                "declaration": false,
                "module": "esnext",
                "moduleResolution": "node",
                "emitDecoratorMetadata": true,
                "experimentalDecorators": true,
                "importHelpers": true,
                "noImplicitAny": true,
                "strictNullChecks": false,
                "noUnusedLocals": true,
                "noUnusedParameters": true,
                "resolveJsonModule": true,
                "allowSyntheticDefaultImports": true,
                "allowUnreachableCode": false,
                "target": "es2015",
                "typeRoots": ["node_modules/@types"],
                "lib": ["es2020", "dom"]
        },
        "angularCompilerOptions": {
                "disableTypeScriptVersionCheck": true,
                "fullTemplateTypeCheck": true,
                "strictInjectionParameters": true
        }
   }
   
   ```
   
   Blind guess: You are missing the `cordova-plugin-file` entry in the `types` 
array.
   
   Edit: Oh and no need to call `import 'cordova-plugin-file'`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to