Skip to content

Commit

Permalink
chore: move types + fix promise response type
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbroos committed Mar 8, 2024
1 parent 88a7fa3 commit 5332e48
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/components/MixpanelContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface MixpanelContextProps<DTO> {

interface MixpanelProviderProps<DTO> {
children: React.ReactNode;
eventApiClient: (args: DTO) => Promise<void>;
eventApiClient: (args: DTO) => Promise<unknown>;
}

const MixpanelContext = createContext<MixpanelContextProps<DTO> | null>(null);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"description": "Configure and use Google Analytics and Google Tag Manager in your Next.js app.",
"type": "module",
"types": "dist/main.d.ts",
"types": "dist/types/main.d.ts",
"main": "dist/analytics-essentials.cjs",
"module": "dist/analytics-essentials.js",
"files": [
Expand Down
9 changes: 1 addition & 8 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,7 @@ export default defineConfig({
},
rollupOptions: {
external: ['react', 'react/jsx-runtime', 'react-dom', 'next'],
output: {
globals: {
react: 'React',
'react/jsx-runtime': 'react/jsx-runtime',
'react-dom': 'ReactDOM',
},
},
},
},
plugins: [react(), dts({ include: ['lib'], rollupTypes: true })],
plugins: [react(), dts({ include: ['lib'], outDir: ['dist/types'] })],
});

0 comments on commit 5332e48

Please sign in to comment.