Skip to content

Commit

Permalink
fix: types exports (#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsi authored Feb 26, 2024
1 parent 3c08cd3 commit b3e0dd5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"main": "./dist/cld-video-player.min.js",
"module": "./lib/cld-video-player.js",
"style": "./dist/cld-video-player.min.css",
"types": "./types/video-player.d.ts",
"types": "./types/cld-video-player.d.ts",
"files": [
"dist",
"lib",
Expand All @@ -16,7 +16,11 @@
"README.md"
],
"exports": {
".": "./lib/cld-video-player.js",
".": {
"import": "./lib/cld-video-player.js",
"require": "./dist/cld-video-player.js",
"types": "./types/cld-video-player.d.ts"
},
"./*": "./lib/*"
},
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"module": "commonjs",
"noImplicitAny": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true
"allowSyntheticDefaultImports": true,
"declaration": true,
"declarationDir": "./types"
},
"include": [
"dist/**/*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file is used to validate the type spec. The code does not actually run.
*/

import cloudinary, { videoPlayer, videoPlayerWithProfile, VideoPlayer } from './video-player';
import cloudinary, { videoPlayer, videoPlayerWithProfile, VideoPlayer } from './cld-video-player';

const player: VideoPlayer = cloudinary.videoPlayer('player', {}, () => {});

Expand Down
File renamed without changes.

0 comments on commit b3e0dd5

Please sign in to comment.