mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2024-12-25 03:08:29 +00:00
[common] 增加多线程相关的类型提示
This commit is contained in:
parent
70d5f79795
commit
1a097e70d8
28
creator-sp.d.ts
vendored
28
creator-sp.d.ts
vendored
@ -790,6 +790,34 @@ declare module cc {
|
||||
|
||||
}
|
||||
|
||||
declare namespace cc.AssetManager {
|
||||
interface CacheManager {
|
||||
/**
|
||||
!#en
|
||||
Get temporary path with origin url, this method only works on mini-game platforms
|
||||
|
||||
Use 'getTempAsync' if multithreading is enabled.
|
||||
|
||||
!#zh
|
||||
通过原始 url 获取临时文件的路径,此方法只在小游戏平台有效
|
||||
|
||||
如果启用了多线程特性,请使用 `getTempAsync`.
|
||||
@param originUrl originUrl
|
||||
*/
|
||||
getTemp(originUrl: string): string;
|
||||
/**
|
||||
!#en
|
||||
Get temporary path with origin url, this method only works on mini-game platforms
|
||||
|
||||
!#zh
|
||||
通过原始 url 获取临时文件的路径,此方法只在小游戏平台有效
|
||||
@param originUrl originUrl
|
||||
@param callback 回调函数,参数是返回的路径
|
||||
*/
|
||||
getTempAsync(originUrl: string, callback: (path: string) => void): void;
|
||||
}
|
||||
}
|
||||
|
||||
declare module sp {
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user