File tree 4 files changed +20
-10
lines changed
4 files changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -251,13 +251,12 @@ art.current = new Artplayer();
251
251
252
252
### Option
253
253
254
- you can also separately import the type for options
254
+ You can also use the option type
255
255
256
- ``` ts{2,4 }
256
+ ``` ts{3 }
257
257
import Artplayer from 'artplayer';
258
- import { type Option } from 'artplayer/types/option';
259
258
260
- const option: Option = {
259
+ const option: Artplayer[' Option'] = {
261
260
container: '.artplayer-app',
262
261
url: './assets/sample/video.mp4',
263
262
};
Original file line number Diff line number Diff line change @@ -254,13 +254,12 @@ art.current = new Artplayer();
254
254
255
255
### Option
256
256
257
- 你也可以单独导入选项的类型
257
+ 你也可以使用选项的类型
258
258
259
- ``` ts{2,4 }
259
+ ``` ts{3 }
260
260
import Artplayer from 'artplayer';
261
- import { type Option } from 'artplayer/types/option';
262
261
263
- const option: Option = {
262
+ const option: Artplayer[' Option'] = {
264
263
container: '.artplayer-app',
265
264
url: './assets/sample/video.mp4',
266
265
};
Original file line number Diff line number Diff line change @@ -16,6 +16,19 @@ export as namespace Artplayer;
16
16
declare class Artplayer extends Player {
17
17
constructor ( option : Option , readyCallback ?: ( this : Artplayer , art : Artplayer ) => unknown ) ;
18
18
19
+ get Config ( ) : Config ;
20
+ get Events ( ) : Events ;
21
+ get Utils ( ) : Utils ;
22
+ get Player ( ) : Player ;
23
+ get Option ( ) : Option ;
24
+ get Subtitle ( ) : Subtitle ;
25
+ get Icons ( ) : Icons ;
26
+ get Template ( ) : Template ;
27
+ get I18n ( ) : I18n ;
28
+ get Setting ( ) : Setting ;
29
+ get SettingOption ( ) : SettingOption ;
30
+ get Component ( ) : Component ;
31
+
19
32
static readonly instances : Artplayer [ ] ;
20
33
static readonly version : string ;
21
34
static readonly env : string ;
Original file line number Diff line number Diff line change 1
1
import Artplayer from '../packages/artplayer' ;
2
- import { type Option } from '../packages/artplayer/types/option' ;
3
2
4
- const option : Option = {
3
+ const option : Artplayer [ ' Option' ] = {
5
4
container : '.artplayer-app' ,
6
5
url : './assets/sample/video.mp4' ,
7
6
} ;
You can’t perform that action at this time.
0 commit comments