Commit 207b31c3 by haojie

新增类型注释

parent b9d7b3db
......@@ -5,14 +5,14 @@ import request from '@/utils/upLoadRequest';
// import audioConversion from '@/worker/audioConversion.js?worker';
export const createAudioContext = () => {
return new (window.AudioContext || window.webkitAudioContext)();
return new window.AudioContext();
};
const audioContext = createAudioContext();
// 获取文件的buffer
export const getFileBuffer = (url: string) => {
return new Promise<Blob>((resolve, reject) => {
return new Promise<AudioBuffer>((resolve, reject) => {
request
.get(url, {
responseType: 'arraybuffer',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment