matomo-tracker
matomo-tracker copied to clipboard
Refactor export of type definitions
Right now we are exporting the types that are used from the root of the library as export { types }, meaning that you can import them and use them as follows:
import { types } from '@datapunt/matomo-tracker-js'
const options: types.UserOptions = {
id: 1
}
From the perspective of shipping the types this makes very little sense, it also creates empty import statements which result in undefined values being exported in some bundlers.
This will have to be changed so the types are directly exported from the root package as follows:
export * from './types'
Which will make it possible to import these types directly:
import { UserOptions } from '@datapunt/matomo-tracker-js'
const options: UserOptions = {
id: 1
}