Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
a906203d
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,发现更多精彩内容 >>
提交
a906203d
编写于
4月 22, 2016
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - remove unused IEqualable
上级
d6a66ba9
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
5 addition
and
37 deletion
+5
-37
src/vs/base/common/objects.ts
src/vs/base/common/objects.ts
+0
-10
src/vs/platform/instantiation/common/descriptors.ts
src/vs/platform/instantiation/common/descriptors.ts
+5
-27
未找到文件。
src/vs/base/common/objects.ts
浏览文件 @
a906203d
...
@@ -6,16 +6,6 @@
...
@@ -6,16 +6,6 @@
import
*
as
Types
from
'
vs/base/common/types
'
;
import
*
as
Types
from
'
vs/base/common/types
'
;
/**
* Equalable objects can compute a
* hash-code and can also tell if they
* are equal to other objects.
*/
export
interface
IEqualable
{
equals
(
other
:
any
):
boolean
;
}
export
function
clone
<
T
>
(
obj
:
T
):
T
{
export
function
clone
<
T
>
(
obj
:
T
):
T
{
if
(
!
obj
||
typeof
obj
!==
'
object
'
)
{
if
(
!
obj
||
typeof
obj
!==
'
object
'
)
{
return
obj
;
return
obj
;
...
...
src/vs/platform/instantiation/common/descriptors.ts
浏览文件 @
a906203d
...
@@ -4,9 +4,8 @@
...
@@ -4,9 +4,8 @@
*--------------------------------------------------------------------------------------------*/
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
'
use strict
'
;
import
errors
=
require
(
'
vs/base/common/errors
'
);
import
{
illegalArgument
}
from
'
vs/base/common/errors
'
;
import
objects
=
require
(
'
vs/base/common/objects
'
);
import
*
as
instantiation
from
'
./instantiation
'
;
import
instantiation
=
require
(
'
./instantiation
'
);
export
class
AbstractDescriptor
<
T
>
{
export
class
AbstractDescriptor
<
T
>
{
...
@@ -30,12 +29,12 @@ export class AbstractDescriptor<T> {
...
@@ -30,12 +29,12 @@ export class AbstractDescriptor<T> {
_validate
(
type
:
T
):
void
{
_validate
(
type
:
T
):
void
{
if
(
!
type
)
{
if
(
!
type
)
{
throw
errors
.
illegalArgument
(
'
can not be falsy
'
);
throw
illegalArgument
(
'
can not be falsy
'
);
}
}
}
}
}
}
export
class
SyncDescriptor
<
T
>
extends
AbstractDescriptor
<
T
>
implements
objects
.
IEqualable
{
export
class
SyncDescriptor
<
T
>
extends
AbstractDescriptor
<
T
>
{
constructor
(
private
_ctor
:
any
,
...
staticArguments
:
any
[])
{
constructor
(
private
_ctor
:
any
,
...
staticArguments
:
any
[])
{
super
(
staticArguments
);
super
(
staticArguments
);
...
@@ -45,16 +44,6 @@ export class SyncDescriptor<T> extends AbstractDescriptor<T> implements objects.
...
@@ -45,16 +44,6 @@ export class SyncDescriptor<T> extends AbstractDescriptor<T> implements objects.
return
this
.
_ctor
;
return
this
.
_ctor
;
}
}
public
equals
(
other
:
any
):
boolean
{
if
(
other
===
this
)
{
return
true
;
}
if
(
!
(
other
instanceof
SyncDescriptor
))
{
return
false
;
}
return
(
<
SyncDescriptor
<
T
>>
other
).
ctor
===
this
.
ctor
;
}
protected
bind
(...
moreStaticArguments
):
SyncDescriptor
<
T
>
{
protected
bind
(...
moreStaticArguments
):
SyncDescriptor
<
T
>
{
let
allArgs
=
[];
let
allArgs
=
[];
allArgs
=
allArgs
.
concat
(
this
.
staticArguments
());
allArgs
=
allArgs
.
concat
(
this
.
staticArguments
());
...
@@ -188,7 +177,7 @@ export interface SyncDescriptor8<A1, A2, A3, A4, A5, A6, A7, A8, T> {
...
@@ -188,7 +177,7 @@ export interface SyncDescriptor8<A1, A2, A3, A4, A5, A6, A7, A8, T> {
bind
(
a1
:
A1
,
a2
:
A2
,
a3
:
A3
,
a4
:
A4
,
a5
:
A5
,
a6
:
A6
,
a7
:
A7
,
a8
:
A8
):
SyncDescriptor0
<
T
>
;
bind
(
a1
:
A1
,
a2
:
A2
,
a3
:
A3
,
a4
:
A4
,
a5
:
A5
,
a6
:
A6
,
a7
:
A7
,
a8
:
A8
):
SyncDescriptor0
<
T
>
;
}
}
export
class
AsyncDescriptor
<
T
>
extends
AbstractDescriptor
<
T
>
implements
AsyncDescriptor0
<
T
>
,
objects
.
IEqualable
{
export
class
AsyncDescriptor
<
T
>
extends
AbstractDescriptor
<
T
>
implements
AsyncDescriptor0
<
T
>
{
public
static
create
<
T
>
(
moduleName
:
string
,
ctorName
:
string
):
AsyncDescriptor
<
T
>
{
public
static
create
<
T
>
(
moduleName
:
string
,
ctorName
:
string
):
AsyncDescriptor
<
T
>
{
return
new
AsyncDescriptor
<
T
>
(
moduleName
,
ctorName
);
return
new
AsyncDescriptor
<
T
>
(
moduleName
,
ctorName
);
...
@@ -209,17 +198,6 @@ export class AsyncDescriptor<T> extends AbstractDescriptor<T> implements AsyncDe
...
@@ -209,17 +198,6 @@ export class AsyncDescriptor<T> extends AbstractDescriptor<T> implements AsyncDe
return
this
.
_ctorName
;
return
this
.
_ctorName
;
}
}
public
equals
(
other
:
any
):
boolean
{
if
(
other
===
this
)
{
return
true
;
}
if
(
!
(
other
instanceof
AsyncDescriptor
))
{
return
false
;
}
return
(
<
AsyncDescriptor
<
any
>>
other
).
moduleName
===
this
.
moduleName
&&
(
<
AsyncDescriptor
<
any
>>
other
).
ctorName
===
this
.
ctorName
;
}
bind
(...
moreStaticArguments
):
AsyncDescriptor
<
T
>
{
bind
(...
moreStaticArguments
):
AsyncDescriptor
<
T
>
{
let
allArgs
=
[];
let
allArgs
=
[];
allArgs
=
allArgs
.
concat
(
this
.
staticArguments
());
allArgs
=
allArgs
.
concat
(
this
.
staticArguments
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录