mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 16:11:20 -08:00
fix: add missing types export in package.json and correct interface syntax in TypeScript definition
This commit is contained in:
1 parent
23da290357
commit
92ff80d285
2 files changed
+7
-6
No files matched your search
@@ -19,14 +19,15 @@
|
|||||||
],
|
],
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
|
"types": "./types/artplayer-plugin-{{name}}.d.ts",
|
||||||
"import": "./dist/artplayer-plugin-{{name}}.mjs",
|
"import": "./dist/artplayer-plugin-{{name}}.mjs",
|
||||||
"require": "./dist/artplayer-plugin-{{name}}.js",
|
"require": "./dist/artplayer-plugin-{{name}}.js"
|
||||||
"types": "./types/artplayer-plugin-{{name}}.d.ts"
|
|
||||||
},
|
},
|
||||||
"./legacy": {
|
"./legacy": {
|
||||||
|
"types": "./types/artplayer-plugin-{{name}}.d.ts",
|
||||||
"import": "./dist/artplayer-plugin-{{name}}.legacy.js",
|
"import": "./dist/artplayer-plugin-{{name}}.legacy.js",
|
||||||
"require": "./dist/artplayer-plugin-{{name}}.legacy.js",
|
"require": "./dist/artplayer-plugin-{{name}}.legacy.js"
|
||||||
"types": "./types/artplayer-plugin-{{name}}.d.ts"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"main": "dist/artplayer-plugin-{{name}}.js",
|
"main": "dist/artplayer-plugin-{{name}}.js",
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ import type Artplayer from 'artplayer';
|
|||||||
|
|
||||||
interface Option {
|
interface Option {
|
||||||
//
|
//
|
||||||
};
|
}
|
||||||
|
|
||||||
interface Result {
|
interface Result {
|
||||||
name: '{{export}}';
|
name: '{{export}}';
|
||||||
};
|
}
|
||||||
|
|
||||||
declare const {{export}}: (option: Option) => (art: Artplayer) => Result;
|
declare const {{export}}: (option: Option) => (art: Artplayer) => Result;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user