Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
e58afe1a
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e58afe1a
编写于
10月 20, 2016
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Thenable<T> everywhere
上级
0621a942
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
45 addition
and
45 deletion
+45
-45
build/monaco/monaco.d.ts.recipe
build/monaco/monaco.d.ts.recipe
+3
-3
extensions/css/server/src/typings/promise.d.ts
extensions/css/server/src/typings/promise.d.ts
+13
-13
extensions/html/server/src/typings/promise.d.ts
extensions/html/server/src/typings/promise.d.ts
+13
-13
extensions/json/server/src/typings/promise.d.ts
extensions/json/server/src/typings/promise.d.ts
+13
-13
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+3
-3
未找到文件。
build/monaco/monaco.d.ts.recipe
浏览文件 @
e58afe1a
declare module monaco {
interface Thenable<
R
> {
interface Thenable<
T
> {
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult>(onfulfilled?: (value:
R
) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>;
then<TResult>(onfulfilled?: (value:
R
) => TResult | Thenable<TResult>, onrejected?: (reason: any) => void): Thenable<TResult>;
then<TResult>(onfulfilled?: (value:
T
) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>;
then<TResult>(onfulfilled?: (value:
T
) => TResult | Thenable<TResult>, onrejected?: (reason: any) => void): Thenable<TResult>;
}
export interface IDisposable {
...
...
extensions/css/server/src/typings/promise.d.ts
浏览文件 @
e58afe1a
...
...
@@ -24,15 +24,15 @@ and limitations under the License.
* enables reusing existing code without migrating to a specific promise implementation. Still,
* we recommand the use of native promises which are available in VS Code.
*/
interface
Thenable
<
R
>
{
interface
Thenable
<
T
>
{
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then
<
TResult
>
(
onfulfilled
?:
(
value
:
R
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
TResult
|
Thenable
<
TResult
>
):
Thenable
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
R
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
void
):
Thenable
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
TResult
|
Thenable
<
TResult
>
):
Thenable
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
void
):
Thenable
<
TResult
>
;
}
/**
...
...
@@ -45,15 +45,15 @@ interface Promise<T> extends Thenable<T> {
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
TResult
|
Thenable
<
TResult
>
):
Promise
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
void
):
Promise
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
TResult
|
Thenable
<
TResult
>
):
Promise
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
void
):
Promise
<
TResult
>
;
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch
(
onrejected
?:
(
reason
:
any
)
=>
T
|
Thenable
<
T
>
):
Promise
<
T
>
;
catch
(
onrejected
?:
(
reason
:
any
)
=>
T
|
Thenable
<
T
>
):
Promise
<
T
>
;
}
interface
PromiseConstructor
{
...
...
@@ -63,7 +63,7 @@ interface PromiseConstructor {
* a resolve callback used resolve the promise with a value or the result of another promise,
* and a reject callback used to reject the promise with a provided reason or error.
*/
new
<
T
>
(
executor
:
(
resolve
:
(
value
?:
T
|
Thenable
<
T
>
)
=>
void
,
reject
:
(
reason
?:
any
)
=>
void
)
=>
void
):
Promise
<
T
>
;
new
<
T
>
(
executor
:
(
resolve
:
(
value
?:
T
|
Thenable
<
T
>
)
=>
void
,
reject
:
(
reason
?:
any
)
=>
void
)
=>
void
):
Promise
<
T
>
;
/**
* Creates a Promise that is resolved with an array of results when all of the provided Promises
...
...
@@ -71,7 +71,7 @@ interface PromiseConstructor {
* @param values An array of Promises.
* @returns A new Promise.
*/
all
<
T
>
(
values
:
Array
<
T
|
Thenable
<
T
>>
):
Promise
<
T
[]
>
;
all
<
T
>
(
values
:
Array
<
T
|
Thenable
<
T
>>
):
Promise
<
T
[]
>
;
/**
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
...
...
@@ -79,34 +79,34 @@ interface PromiseConstructor {
* @param values An array of Promises.
* @returns A new Promise.
*/
race
<
T
>
(
values
:
Array
<
T
|
Thenable
<
T
>>
):
Promise
<
T
>
;
race
<
T
>
(
values
:
Array
<
T
|
Thenable
<
T
>>
):
Promise
<
T
>
;
/**
* Creates a new rejected promise for the provided reason.
* @param reason The reason the promise was rejected.
* @returns A new rejected Promise.
*/
reject
(
reason
:
any
):
Promise
<
void
>
;
reject
(
reason
:
any
):
Promise
<
void
>
;
/**
* Creates a new rejected promise for the provided reason.
* @param reason The reason the promise was rejected.
* @returns A new rejected Promise.
*/
reject
<
T
>
(
reason
:
any
):
Promise
<
T
>
;
reject
<
T
>
(
reason
:
any
):
Promise
<
T
>
;
/**
* Creates a new resolved promise for the provided value.
* @param value A promise.
* @returns A promise whose internal state matches the provided promise.
*/
resolve
<
T
>
(
value
:
T
|
Thenable
<
T
>
):
Promise
<
T
>
;
resolve
<
T
>
(
value
:
T
|
Thenable
<
T
>
):
Promise
<
T
>
;
/**
* Creates a new resolved promise .
* @returns A resolved promise.
*/
resolve
():
Promise
<
void
>
;
resolve
():
Promise
<
void
>
;
}
declare
var
Promise
:
PromiseConstructor
;
extensions/html/server/src/typings/promise.d.ts
浏览文件 @
e58afe1a
...
...
@@ -24,15 +24,15 @@ and limitations under the License.
* enables reusing existing code without migrating to a specific promise implementation. Still,
* we recommand the use of native promises which are available in VS Code.
*/
interface
Thenable
<
R
>
{
interface
Thenable
<
T
>
{
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then
<
TResult
>
(
onfulfilled
?:
(
value
:
R
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
TResult
|
Thenable
<
TResult
>
):
Thenable
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
R
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
void
):
Thenable
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
TResult
|
Thenable
<
TResult
>
):
Thenable
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
void
):
Thenable
<
TResult
>
;
}
/**
...
...
@@ -45,15 +45,15 @@ interface Promise<T> extends Thenable<T> {
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
TResult
|
Thenable
<
TResult
>
):
Promise
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
void
):
Promise
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
TResult
|
Thenable
<
TResult
>
):
Promise
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
void
):
Promise
<
TResult
>
;
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch
(
onrejected
?:
(
reason
:
any
)
=>
T
|
Thenable
<
T
>
):
Promise
<
T
>
;
catch
(
onrejected
?:
(
reason
:
any
)
=>
T
|
Thenable
<
T
>
):
Promise
<
T
>
;
}
interface
PromiseConstructor
{
...
...
@@ -63,7 +63,7 @@ interface PromiseConstructor {
* a resolve callback used resolve the promise with a value or the result of another promise,
* and a reject callback used to reject the promise with a provided reason or error.
*/
new
<
T
>
(
executor
:
(
resolve
:
(
value
?:
T
|
Thenable
<
T
>
)
=>
void
,
reject
:
(
reason
?:
any
)
=>
void
)
=>
void
):
Promise
<
T
>
;
new
<
T
>
(
executor
:
(
resolve
:
(
value
?:
T
|
Thenable
<
T
>
)
=>
void
,
reject
:
(
reason
?:
any
)
=>
void
)
=>
void
):
Promise
<
T
>
;
/**
* Creates a Promise that is resolved with an array of results when all of the provided Promises
...
...
@@ -71,7 +71,7 @@ interface PromiseConstructor {
* @param values An array of Promises.
* @returns A new Promise.
*/
all
<
T
>
(
values
:
Array
<
T
|
Thenable
<
T
>>
):
Promise
<
T
[]
>
;
all
<
T
>
(
values
:
Array
<
T
|
Thenable
<
T
>>
):
Promise
<
T
[]
>
;
/**
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
...
...
@@ -79,34 +79,34 @@ interface PromiseConstructor {
* @param values An array of Promises.
* @returns A new Promise.
*/
race
<
T
>
(
values
:
Array
<
T
|
Thenable
<
T
>>
):
Promise
<
T
>
;
race
<
T
>
(
values
:
Array
<
T
|
Thenable
<
T
>>
):
Promise
<
T
>
;
/**
* Creates a new rejected promise for the provided reason.
* @param reason The reason the promise was rejected.
* @returns A new rejected Promise.
*/
reject
(
reason
:
any
):
Promise
<
void
>
;
reject
(
reason
:
any
):
Promise
<
void
>
;
/**
* Creates a new rejected promise for the provided reason.
* @param reason The reason the promise was rejected.
* @returns A new rejected Promise.
*/
reject
<
T
>
(
reason
:
any
):
Promise
<
T
>
;
reject
<
T
>
(
reason
:
any
):
Promise
<
T
>
;
/**
* Creates a new resolved promise for the provided value.
* @param value A promise.
* @returns A promise whose internal state matches the provided promise.
*/
resolve
<
T
>
(
value
:
T
|
Thenable
<
T
>
):
Promise
<
T
>
;
resolve
<
T
>
(
value
:
T
|
Thenable
<
T
>
):
Promise
<
T
>
;
/**
* Creates a new resolved promise .
* @returns A resolved promise.
*/
resolve
():
Promise
<
void
>
;
resolve
():
Promise
<
void
>
;
}
declare
var
Promise
:
PromiseConstructor
;
extensions/json/server/src/typings/promise.d.ts
浏览文件 @
e58afe1a
...
...
@@ -24,15 +24,15 @@ and limitations under the License.
* enables reusing existing code without migrating to a specific promise implementation. Still,
* we recommand the use of native promises which are available in VS Code.
*/
interface
Thenable
<
R
>
{
interface
Thenable
<
T
>
{
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then
<
TResult
>
(
onfulfilled
?:
(
value
:
R
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
TResult
|
Thenable
<
TResult
>
):
Thenable
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
R
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
void
):
Thenable
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
TResult
|
Thenable
<
TResult
>
):
Thenable
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
void
):
Thenable
<
TResult
>
;
}
/**
...
...
@@ -45,15 +45,15 @@ interface Promise<T> extends Thenable<T> {
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
TResult
|
Thenable
<
TResult
>
):
Promise
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
void
):
Promise
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
TResult
|
Thenable
<
TResult
>
):
Promise
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
void
):
Promise
<
TResult
>
;
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch
(
onrejected
?:
(
reason
:
any
)
=>
T
|
Thenable
<
T
>
):
Promise
<
T
>
;
catch
(
onrejected
?:
(
reason
:
any
)
=>
T
|
Thenable
<
T
>
):
Promise
<
T
>
;
}
interface
PromiseConstructor
{
...
...
@@ -63,7 +63,7 @@ interface PromiseConstructor {
* a resolve callback used resolve the promise with a value or the result of another promise,
* and a reject callback used to reject the promise with a provided reason or error.
*/
new
<
T
>
(
executor
:
(
resolve
:
(
value
?:
T
|
Thenable
<
T
>
)
=>
void
,
reject
:
(
reason
?:
any
)
=>
void
)
=>
void
):
Promise
<
T
>
;
new
<
T
>
(
executor
:
(
resolve
:
(
value
?:
T
|
Thenable
<
T
>
)
=>
void
,
reject
:
(
reason
?:
any
)
=>
void
)
=>
void
):
Promise
<
T
>
;
/**
* Creates a Promise that is resolved with an array of results when all of the provided Promises
...
...
@@ -71,7 +71,7 @@ interface PromiseConstructor {
* @param values An array of Promises.
* @returns A new Promise.
*/
all
<
T
>
(
values
:
Array
<
T
|
Thenable
<
T
>>
):
Promise
<
T
[]
>
;
all
<
T
>
(
values
:
Array
<
T
|
Thenable
<
T
>>
):
Promise
<
T
[]
>
;
/**
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
...
...
@@ -79,34 +79,34 @@ interface PromiseConstructor {
* @param values An array of Promises.
* @returns A new Promise.
*/
race
<
T
>
(
values
:
Array
<
T
|
Thenable
<
T
>>
):
Promise
<
T
>
;
race
<
T
>
(
values
:
Array
<
T
|
Thenable
<
T
>>
):
Promise
<
T
>
;
/**
* Creates a new rejected promise for the provided reason.
* @param reason The reason the promise was rejected.
* @returns A new rejected Promise.
*/
reject
(
reason
:
any
):
Promise
<
void
>
;
reject
(
reason
:
any
):
Promise
<
void
>
;
/**
* Creates a new rejected promise for the provided reason.
* @param reason The reason the promise was rejected.
* @returns A new rejected Promise.
*/
reject
<
T
>
(
reason
:
any
):
Promise
<
T
>
;
reject
<
T
>
(
reason
:
any
):
Promise
<
T
>
;
/**
* Creates a new resolved promise for the provided value.
* @param value A promise.
* @returns A promise whose internal state matches the provided promise.
*/
resolve
<
T
>
(
value
:
T
|
Thenable
<
T
>
):
Promise
<
T
>
;
resolve
<
T
>
(
value
:
T
|
Thenable
<
T
>
):
Promise
<
T
>
;
/**
* Creates a new resolved promise .
* @returns A resolved promise.
*/
resolve
():
Promise
<
void
>
;
resolve
():
Promise
<
void
>
;
}
declare
var
Promise
:
PromiseConstructor
;
src/vs/monaco.d.ts
浏览文件 @
e58afe1a
declare
module
monaco
{
interface
Thenable
<
R
>
{
interface
Thenable
<
T
>
{
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then
<
TResult
>
(
onfulfilled
?:
(
value
:
R
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
TResult
|
Thenable
<
TResult
>
):
Thenable
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
R
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
void
):
Thenable
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
TResult
|
Thenable
<
TResult
>
):
Thenable
<
TResult
>
;
then
<
TResult
>
(
onfulfilled
?:
(
value
:
T
)
=>
TResult
|
Thenable
<
TResult
>
,
onrejected
?:
(
reason
:
any
)
=>
void
):
Thenable
<
TResult
>
;
}
export
interface
IDisposable
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录