Capacitor: Don't encourage wildcard ambient module declarations

Created on 23 Jan 2018  ·  2Comments  ·  Source: ionic-team/capacitor

https://github.com/ionic-team/capacitor/blob/9f4720049df76023461c204fbaa2494a08672011/example/src/declarations.d.ts

This is for an example project, but as you know, our team doesn't consider this to be a best-practice. Maybe guide users to a better spot, but let them know how to opt out.

```
// In some cases, a package/library won't have declaration files for TypeScript.
// Depending on your settings, TypeScript may issue errors when importing an untyped library.
// To get around that, write your own .d.ts files, or add a line such as
//
// declare module "your-package-name-here";
//
// If you want to get rid of these errors entirely, you can use a wildcard path as so:
//
// declare module "*";
//
// But be careful! This will permit invalid imports, and give no verification for untyped modules.

Most helpful comment

Thanks, the example has some old stuff in it we'll remove

All 2 comments

Thanks, the example has some old stuff in it we'll remove

❤️

Was this page helpful?
0 / 5 - 0 ratings