Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
61a2faf7
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
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,发现更多精彩内容 >>
提交
61a2faf7
编写于
10月 01, 2018
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - remove declaration for WinJS.Promise#any
上级
fb75f32b
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
8 addition
and
8 deletion
+8
-8
src/vs/base/common/winjs.base.d.ts
src/vs/base/common/winjs.base.d.ts
+0
-2
src/vs/base/common/winjs.polyfill.promise.ts
src/vs/base/common/winjs.polyfill.promise.ts
+5
-1
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+0
-2
src/vs/platform/launch/electron-main/launchService.ts
src/vs/platform/launch/electron-main/launchService.ts
+1
-1
src/vs/workbench/api/node/extHostQuickOpen.ts
src/vs/workbench/api/node/extHostQuickOpen.ts
+2
-2
未找到文件。
src/vs/base/common/winjs.base.d.ts
浏览文件 @
61a2faf7
...
...
@@ -23,8 +23,6 @@ export class Promise<T = any> {
public
static
join
<
T1
,
T2
>
(
promises
:
[
T1
|
PromiseLike
<
T1
>
,
T2
|
PromiseLike
<
T2
>
]):
Promise
<
[
T1
,
T2
]
>
;
public
static
join
<
T
>
(
promises
:
(
T
|
PromiseLike
<
T
>
)[]):
Promise
<
T
[]
>
;
public
static
any
<
T
>
(
promises
:
(
T
|
PromiseLike
<
T
>
)[]):
Promise
<
{
key
:
string
;
value
:
Promise
<
T
>
;
}
>
;
public
static
wrap
<
T
>
(
value
:
T
|
PromiseLike
<
T
>
):
Promise
<
T
>
;
public
static
wrapError
<
T
=
never
>
(
error
:
Error
):
Promise
<
T
>
;
...
...
src/vs/base/common/winjs.polyfill.promise.ts
浏览文件 @
61a2faf7
...
...
@@ -11,6 +11,10 @@ function isWinJSPromise(candidate: any): candidate is WinJSPromise {
return
isThenable
(
candidate
)
&&
typeof
(
candidate
as
any
).
done
===
'
function
'
;
}
declare
class
WinJSPromiseRemovals
{
any
<
T
=
any
>
(
promises
:
(
T
|
PromiseLike
<
T
>
)[]):
WinJSPromise
<
{
key
:
string
;
value
:
WinJSPromise
<
T
>
;
}
>
;
}
/**
* A polyfill for the native promises. The implementation is based on
* WinJS promises but tries to gap differences between winjs promises
...
...
@@ -33,7 +37,7 @@ export class PolyfillPromise<T = any> implements Promise<T> {
static
race
(
thenables
:
Thenable
<
any
>
[]):
PolyfillPromise
{
// WinJSPromise returns `{ key: <index/key>, value: <promise> }`
// from the `any` call and Promise.race just wants the value
return
new
PolyfillPromise
(
WinJSPromise
.
any
(
thenables
).
then
(
entry
=>
entry
.
value
,
err
=>
err
.
value
));
return
new
PolyfillPromise
(
(
WinJSPromise
as
any
as
WinJSPromiseRemovals
)
.
any
(
thenables
).
then
(
entry
=>
entry
.
value
,
err
=>
err
.
value
));
}
static
resolve
(
value
):
PolyfillPromise
{
...
...
src/vs/monaco.d.ts
浏览文件 @
61a2faf7
...
...
@@ -55,8 +55,6 @@ declare namespace monaco {
public
static
join
<
T1
,
T2
>
(
promises
:
[
T1
|
PromiseLike
<
T1
>
,
T2
|
PromiseLike
<
T2
>
]):
Promise
<
[
T1
,
T2
]
>
;
public
static
join
<
T
>
(
promises
:
(
T
|
PromiseLike
<
T
>
)[]):
Promise
<
T
[]
>
;
public
static
any
<
T
>
(
promises
:
(
T
|
PromiseLike
<
T
>
)[]):
Promise
<
{
key
:
string
;
value
:
Promise
<
T
>
;
}
>
;
public
static
wrap
<
T
>
(
value
:
T
|
PromiseLike
<
T
>
):
Promise
<
T
>
;
public
static
wrapError
<
T
=
never
>
(
error
:
Error
):
Promise
<
T
>
;
...
...
src/vs/platform/launch/electron-main/launchService.ts
浏览文件 @
61a2faf7
...
...
@@ -234,7 +234,7 @@ export class LaunchService implements ILaunchService {
// is being used and only then resolve the startup promise which will kill this second instance.
// In addition, we poll for the wait marker file to be deleted to return.
if
(
args
.
wait
&&
usedWindows
.
length
===
1
&&
usedWindows
[
0
])
{
return
TPromise
.
any
([
return
Promise
.
race
([
this
.
windowsMainService
.
waitForWindowCloseOrLoad
(
usedWindows
[
0
].
id
),
whenDeleted
(
args
.
waitMarkerFilePath
)
]).
then
(()
=>
void
0
,
()
=>
void
0
);
...
...
src/vs/workbench/api/node/extHostQuickOpen.ts
浏览文件 @
61a2faf7
...
...
@@ -54,8 +54,8 @@ export class ExtHostQuickOpen implements ExtHostQuickOpenShape {
canPickMany
:
options
&&
options
.
canPickMany
},
token
);
return
TPromise
.
any
(
<
TPromise
<
number
|
Item
[]
>
[]
>
[
quickPickWidget
,
itemsPromise
]).
then
(
values
=>
{
if
(
value
s
.
key
===
'
0
'
)
{
return
Promise
.
race
(
<
Thenable
<
false
|
Item
[]
>
[]
>
[
quickPickWidget
.
then
(()
=>
false
),
itemsPromise
]).
then
(
value
=>
{
if
(
value
===
false
)
{
return
undefined
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录