mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[video.js] all plugins are optional, so plugins option should be a Partial<> (#39443)
* all plugins are optional, so plugins option should be a Partial<> * fix whitespace
This commit is contained in:
parent
11e61c1409
commit
3c2e0e5af0
2
types/video.js/index.d.ts
vendored
2
types/video.js/index.d.ts
vendored
@ -6719,7 +6719,7 @@ declare namespace videojs {
|
||||
nativeControlsForTouch?: boolean;
|
||||
notSupportedMessage?: string;
|
||||
playbackRates?: number[];
|
||||
plugins?: VideoJsPlayerPluginOptions;
|
||||
plugins?: Partial<VideoJsPlayerPluginOptions>;
|
||||
poster?: string;
|
||||
preload?: string;
|
||||
sourceOrder?: boolean;
|
||||
|
||||
4
types/video.js/video.js-some-plugin.d.ts
vendored
4
types/video.js/video.js-some-plugin.d.ts
vendored
@ -9,6 +9,8 @@ declare module 'video.js' {
|
||||
}
|
||||
|
||||
interface VideoJsPlayerPluginOptions {
|
||||
somePluginDefinedInAugmentation: {};
|
||||
somePluginDefinedInAugmentation: {
|
||||
someRequiredProperty: boolean;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,12 +122,17 @@ function testPlugin(player: videojs.Player, options: {}) {
|
||||
|
||||
function testAugmentation(player: videojs.Player) {
|
||||
player.somePluginDefinedInAugmentation();
|
||||
videojs("example_video_2", {
|
||||
plugins: {
|
||||
somePluginDefinedInAugmentation: {},
|
||||
someOtherPluginNotTyped: {}
|
||||
}
|
||||
});
|
||||
videojs('example_video_2', {
|
||||
plugins: {
|
||||
somePluginDefinedInAugmentation: {
|
||||
someRequiredProperty: true
|
||||
},
|
||||
someOtherPluginNotTyped: {},
|
||||
},
|
||||
});
|
||||
videojs('example_video_3', {
|
||||
plugins: {}
|
||||
});
|
||||
}
|
||||
|
||||
function testLogger() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user