mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51:20 -08:00
fix(canvas): [PKG-CANVAS-04] preserve public type and export compatibility
This commit is contained in:
1 parent
2b319109cd
commit
224572032a
29 files changed
+682
-41
No files matched your search
+19
-8
@@ -1,10 +1,21 @@
|
||||
type Option = (ctx: CanvasRenderingContext2D, video: HTMLVideoElement) => void
|
||||
|
||||
type Result = HTMLCanvasElement
|
||||
|
||||
declare const artplayerProxyCanvas: (option?: Option) => (art: Artplayer) => Result
|
||||
|
||||
export default artplayerProxyCanvas
|
||||
|
||||
// Generated from the package public declaration by yarn build:ts. Do not edit.
|
||||
/* eslint-disable ts/no-redeclare -- Callable and public type namespace intentionally merge. */
|
||||
declare namespace artplayerProxyCanvas {
|
||||
/** Runs after drawing and bitmap release, before the draw event. */
|
||||
type Option = (ctx: CanvasRenderingContext2D, video: HTMLVideoElement) => void
|
||||
/** Preserve the exact published return type and its assignability. */
|
||||
type Result = HTMLCanvasElement
|
||||
/** Opt-in view of supported enumerable media members; native Canvas members win. */
|
||||
type MediaCanvas = HTMLCanvasElement & Pick<HTMLVideoElement, Exclude<keyof HTMLVideoElement, keyof HTMLCanvasElement>>
|
||||
interface Callable {
|
||||
/** Keep Parameters extraction optional, as published in 1.1.0. */
|
||||
(option?: Option): (art: Artplayer) => Result
|
||||
}
|
||||
interface Factory extends Callable {
|
||||
/** Same factory, for historical require(package).default calls. */
|
||||
readonly default: Factory
|
||||
}
|
||||
}
|
||||
declare const artplayerProxyCanvas: artplayerProxyCanvas.Factory
|
||||
export = artplayerProxyCanvas
|
||||
export as namespace artplayerProxyCanvas;
|
||||
Reference in new issue
Block a user