Typescript support
See original GitHub issueI am implementing firebase-analytics for mobile app and I am using angular. I am not sure if I am missing something but once I hover on some function I don’t see any information in VS Code regarding its parameters and output.
Is the project missing types declaration?
I am using TSlint if it helps. Example of my implementation, hovering on logEvent() only shows any:
import { Plugins } from '@capacitor/core';
const { FirebaseAnalytics } = Plugins;
publishEvent(event: Event): void {
FirebaseAnalytics.logEvent({ name: eventName, params: value });
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:10 (3 by maintainers)
Top Results From Across the Web
TypeScript: JavaScript With Syntax For Types.
TypeScript extends JavaScript by adding types to the language. ... TypeScript adds additional syntax to JavaScript to support a tighter integration with ...
Read more >TypeScript - Wikipedia
TypeScript supports definition files that can contain type information of existing JavaScript libraries, much like C++ header files can describe the ...
Read more >TypeScript Programming with Visual Studio Code
VS Code comes with great debugging support for TypeScript, including support for sourcemaps. Set breakpoints, inspect objects, navigate the call stack, and ...
Read more >TypeScript | WebStorm Documentation
WebStorm supports developing, running, and debugging TypeScript source code. ... Learn more from Compiling TypeScript into JavaScript.
Read more >Using Vue with TypeScript
Volar is the official VSCode extension that provides TypeScript support inside Vue SFCs, along with many other great features.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@brownoxford Importing
import "@capacitor-community/firebase-analytics";
solved the issue! Thank you. Will close the issue now.Hmm, here are my imports for the working capacitor v2 implementation where I got that screenshot:
It looks like your first implementation may not have been working because you were not also importing “@capacitor-community/firebase-analytics” - you need that import because it actually exports all of the definitions for the plugin via
export * from './definitions'
The new style you show is only for capacitor v3, so I would not use that unless you are upgrading: