mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
refactor(asr): [PKG-ASR-04] preserve old declarations and add precise runtime types
This commit is contained in:
1 parent
0cf2af4840
commit
93208e59e1
24 files changed
+1224
-19
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import type { AudioChunk, Factory, RuntimeFactory, RuntimeOption, RuntimeResult } from 'artplayer-plugin-asr'
|
||||
import type source from '../../packages/artplayer-plugin-asr/src/index'
|
||||
import type { AsrOptions, AsrResult, AudioChunk as SourceChunk } from '../../packages/artplayer-plugin-asr/src/types'
|
||||
|
||||
declare const implementation: typeof source
|
||||
declare const runtimeFactory: RuntimeFactory
|
||||
declare const runtimeOption: RuntimeOption
|
||||
declare const sourceResult: AsrResult
|
||||
declare const publicResult: RuntimeResult
|
||||
declare const sourceChunk: SourceChunk
|
||||
declare const publicChunk: AudioChunk
|
||||
|
||||
const historical: Factory = implementation
|
||||
const accurate: Factory = runtimeFactory
|
||||
const runtimeCall: (option?: RuntimeOption) => ReturnType<RuntimeFactory> = implementation
|
||||
const sourceOption: AsrOptions = runtimeOption
|
||||
const resultToPublic: RuntimeResult = sourceResult
|
||||
const resultToSource: AsrResult = publicResult
|
||||
const chunkToPublic: AudioChunk = sourceChunk
|
||||
const chunkToSource: SourceChunk = publicChunk
|
||||
void [historical, accurate, runtimeCall, sourceOption, resultToPublic, resultToSource, chunkToPublic, chunkToSource]
|
||||
Reference in new issue
Block a user