Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
f7eeebcd
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f7eeebcd
编写于
9月 04, 2018
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
done with done, #57695
上级
1bef172f
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
9 addition
and
25 deletion
+9
-25
src/vs/base/common/async.ts
src/vs/base/common/async.ts
+5
-5
src/vs/base/common/winjs.base.d.ts
src/vs/base/common/winjs.base.d.ts
+0
-4
src/vs/base/parts/ipc/node/ipc.cp.ts
src/vs/base/parts/ipc/node/ipc.cp.ts
+1
-1
src/vs/base/parts/ipc/node/ipc.ts
src/vs/base/parts/ipc/node/ipc.ts
+1
-1
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+0
-4
src/vs/platform/extensionManagement/node/extensionsManifestCache.ts
...tform/extensionManagement/node/extensionsManifestCache.ts
+1
-1
src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts
...parts/extensions/electron-browser/extensionTipsService.ts
+1
-1
src/vs/workbench/services/extensions/node/lazyPromise.ts
src/vs/workbench/services/extensions/node/lazyPromise.ts
+0
-8
未找到文件。
src/vs/base/common/async.ts
浏览文件 @
f7eeebcd
...
...
@@ -160,7 +160,7 @@ export class Throttler {
};
this
.
queuedPromise
=
new
TPromise
(
c
=>
{
this
.
activePromise
.
then
(
onComplete
,
onComplete
).
done
(
c
);
this
.
activePromise
.
then
(
onComplete
,
onComplete
).
then
(
c
);
},
()
=>
{
this
.
activePromise
.
cancel
();
});
...
...
@@ -176,7 +176,7 @@ export class Throttler {
this
.
activePromise
=
promiseFactory
();
return
new
TPromise
((
c
,
e
)
=>
{
this
.
activePromise
.
done
((
result
:
any
)
=>
{
this
.
activePromise
.
then
((
result
:
any
)
=>
{
this
.
activePromise
=
null
;
c
(
result
);
},
(
err
:
any
)
=>
{
...
...
@@ -378,7 +378,7 @@ export function timeout(n: number): CancelablePromise<void> {
* @returns `true` if candidate is a `WinJS.Promise`
*/
export
function
isWinJSPromise
(
candidate
:
any
):
candidate
is
TPromise
{
return
isThenable
(
candidate
)
&&
typeof
(
<
TPromise
>
candidate
).
done
===
'
function
'
;
return
isThenable
(
candidate
)
&&
typeof
(
candidate
as
any
).
done
===
'
function
'
;
}
/**
...
...
@@ -524,8 +524,8 @@ export class Limiter<T> {
this
.
runningPromises
++
;
const
promise
=
iLimitedTask
.
factory
();
promise
.
done
(
iLimitedTask
.
c
,
iLimitedTask
.
e
);
promise
.
done
(()
=>
this
.
consumed
(),
()
=>
this
.
consumed
());
promise
.
then
(
iLimitedTask
.
c
,
iLimitedTask
.
e
);
promise
.
then
(()
=>
this
.
consumed
(),
()
=>
this
.
consumed
());
}
}
...
...
src/vs/base/common/winjs.base.d.ts
浏览文件 @
f7eeebcd
...
...
@@ -17,10 +17,6 @@ export class Promise<T = any> {
onfulfilled
?:
((
value
:
T
)
=>
TResult1
|
PromiseLike
<
TResult1
>
)
|
null
,
onrejected
?:
((
reason
:
any
)
=>
TResult2
|
PromiseLike
<
TResult2
>
)
|
null
):
Promise
<
TResult1
|
TResult2
>
;
public
done
(
onfulfilled
?:
(
value
:
T
)
=>
void
,
onrejected
?:
(
reason
:
any
)
=>
void
):
void
;
public
cancel
():
void
;
public
static
as
(
value
:
null
):
Promise
<
null
>
;
...
...
src/vs/base/parts/ipc/node/ipc.cp.ts
浏览文件 @
f7eeebcd
...
...
@@ -113,7 +113,7 @@ export class Client implements IChannelClient, IDisposable {
const
request
:
TPromise
<
void
>
=
channel
.
call
(
name
,
arg
);
const
result
=
new
TPromise
<
void
>
((
c
,
e
)
=>
{
request
.
then
(
c
,
e
).
done
(()
=>
{
request
.
then
(
c
,
e
).
then
(()
=>
{
if
(
!
this
.
activeRequests
)
{
return
;
}
...
...
src/vs/base/parts/ipc/node/ipc.ts
浏览文件 @
f7eeebcd
...
...
@@ -334,7 +334,7 @@ export class ChannelClient implements IChannelClient, IDisposable {
activeRequest
.
then
(
null
,
_
=>
null
)
.
done
(()
=>
this
.
activeRequests
=
this
.
activeRequests
.
filter
(
el
=>
el
!==
disposable
));
.
then
(()
=>
this
.
activeRequests
=
this
.
activeRequests
.
filter
(
el
=>
el
!==
disposable
));
return
activeRequest
;
}
...
...
src/vs/monaco.d.ts
浏览文件 @
f7eeebcd
...
...
@@ -53,10 +53,6 @@ declare namespace monaco {
onfulfilled
?:
((
value
:
T
)
=>
TResult1
|
PromiseLike
<
TResult1
>
)
|
null
,
onrejected
?:
((
reason
:
any
)
=>
TResult2
|
PromiseLike
<
TResult2
>
)
|
null
):
Promise
<
TResult1
|
TResult2
>
;
public
done
(
onfulfilled
?:
(
value
:
T
)
=>
void
,
onrejected
?:
(
reason
:
any
)
=>
void
):
void
;
public
cancel
():
void
;
public
static
as
(
value
:
null
):
Promise
<
null
>
;
...
...
src/vs/platform/extensionManagement/node/extensionsManifestCache.ts
浏览文件 @
f7eeebcd
...
...
@@ -37,6 +37,6 @@ export class ExtensionsManifestCache extends Disposable {
}
invalidate
():
void
{
pfs
.
del
(
this
.
extensionsManifestCache
).
done
(()
=>
{
},
()
=>
{
});
pfs
.
del
(
this
.
extensionsManifestCache
).
then
(()
=>
{
},
()
=>
{
});
}
}
src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts
浏览文件 @
f7eeebcd
...
...
@@ -714,7 +714,7 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe
return
;
}
return
this
.
extensionsService
.
getInstalled
(
LocalExtensionType
.
User
).
done
(
local
=>
{
this
.
extensionsService
.
getInstalled
(
LocalExtensionType
.
User
).
then
(
local
=>
{
const
recommendations
=
filteredRecs
.
filter
(({
extensionId
})
=>
local
.
every
(
local
=>
!
areSameExtensions
({
id
:
extensionId
},
{
id
:
getGalleryExtensionIdFromLocal
(
local
)
})));
if
(
!
recommendations
.
length
)
{
...
...
src/vs/workbench/services/extensions/node/lazyPromise.ts
浏览文件 @
f7eeebcd
...
...
@@ -91,14 +91,6 @@ export class LazyPromise implements TPromise<any> {
return
this
.
_ensureActual
().
then
(
success
,
error
);
}
public
done
(
success
:
any
,
error
:
any
):
void
{
if
(
this
.
_isCanceled
)
{
return
;
}
this
.
_ensureActual
().
done
(
success
,
error
);
}
public
cancel
():
void
{
if
(
this
.
_hasValue
||
this
.
_hasErr
)
{
return
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录