Open
Description
import { trackSelfDescribingEvent } from '@snowplow/webview-tracker';
results in:
Could not find a declaration file for module '@snowplow/webview-tracker'. '[local path]/node_modules/@snowplow/webview-tracker/dist/index.umd.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/snowplow__webview-tracker` if it exists or add a new declaration (.d.ts) file containing `declare module '@snowplow/webview-tracker';`ts(7016)
Adding types
to exports
resolves the issue.
"exports": {
"import": "./dist/index.modern.mjs",
"require": "./dist/index.umd.js",
"types": "./dist/index.d.ts"
},
Metadata
Metadata
Assignees
Labels
No labels