cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cordova-plugin-file] timbru31 commented on issue #400: Add documentation on how to use this plugin with TypeScript
Date Wed, 24 Jun 2020 13:27:01 GMT

timbru31 commented 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.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message