New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript support for analytics-plugin-do-not-track #134
Comments
Looks like there are no options for this plugin. https://github.com/DavidWells/analytics/blob/master/packages/analytics-plugin-do-not-track/src/index.js It just uses the browser do not track settings. So I guess no types are needed? 😃 |
import { Analytics } from 'analytics';
import doNotTrackPlugin from 'analytics-plugin-do-not-track';
Analytics({
plugins: [doNotTrackPlugin()], // <<< This gets mad because `doNotTrackPlugin` has no type and `Analytics` is expecting a plugin type.
...
}); |
Yeah so to use this library with the |
Not sure how to add types here for this. Maybe this belongs in https://github.com/DefinitelyTyped/DefinitelyTyped ? |
Is there a way to export in the package: declare module 'analytics-plugin-do-not-track' {
import type { AnalyticsPlugin } from 'analytics';
export default function doNotTrackPlugin(): AnalyticsPlugin;
} Because that's all it is |
Similar to #99, there aren't types for analytics-plugin-do-not-track. I don't want to add the types to https://github.com/DefinitelyTyped/DefinitelyTyped when there's some level of typescript support in some of the projects.
The text was updated successfully, but these errors were encountered: