mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 02:01:20 -08:00
fix(thumbnail): [PKG-TOOL-THUMB-04] supply public types and installed module entries
This commit is contained in:
1 parent
15485b6420
commit
3bff236145
33 files changed
+2466
-164
No files matched your search
@@ -0,0 +1,14 @@
|
||||
// eslint-disable-next-line ts/no-require-imports -- Test the actual CommonJS constructor without interop helpers.
|
||||
import Thumbnail = require('artplayer-tool-thumbnail')
|
||||
// eslint-disable-next-line ts/no-require-imports -- The legacy subpath also directly exports its constructor.
|
||||
import Legacy = require('artplayer-tool-thumbnail/legacy')
|
||||
|
||||
const option: Thumbnail.Option = { fileInput: document.createElement('input') }
|
||||
const tool: Thumbnail = new Thumbnail(option)
|
||||
const legacy: Thumbnail = new Legacy(option)
|
||||
const pending: Promise<void> = tool.start()
|
||||
tool.on('update', (url, progress) => url + progress.toFixed())
|
||||
void [legacy, pending]
|
||||
// @ts-expect-error No self-default constructor is exported.
|
||||
const WrongAlias = Thumbnail.default
|
||||
void WrongAlias
|
||||
Reference in new issue
Block a user