Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
e2cf8ebc
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,发现更多精彩内容 >>
提交
e2cf8ebc
编写于
12月 07, 2018
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Enable strictBindCallApply for VS Code
Fixes #64633
上级
8b4924d7
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
17 addition
and
16 deletion
+17
-16
src/tsconfig.base.json
src/tsconfig.base.json
+1
-0
src/vs/base/test/common/winjs.promise.test.ts
src/vs/base/test/common/winjs.promise.test.ts
+2
-2
src/vs/editor/standalone/browser/simpleServices.ts
src/vs/editor/standalone/browser/simpleServices.ts
+1
-1
src/vs/editor/test/browser/editorTestServices.ts
src/vs/editor/test/browser/editorTestServices.ts
+1
-1
src/vs/platform/instantiation/common/instantiationService.ts
src/vs/platform/instantiation/common/instantiationService.ts
+2
-2
src/vs/workbench/api/node/extHost.api.impl.ts
src/vs/workbench/api/node/extHost.api.impl.ts
+1
-1
src/vs/workbench/api/node/extHostFileSystemEventService.ts
src/vs/workbench/api/node/extHostFileSystemEventService.ts
+3
-3
src/vs/workbench/browser/parts/views/customView.ts
src/vs/workbench/browser/parts/views/customView.ts
+1
-1
src/vs/workbench/node/proxyResolver.ts
src/vs/workbench/node/proxyResolver.ts
+2
-2
src/vs/workbench/parts/files/electron-browser/views/explorerView.ts
...kbench/parts/files/electron-browser/views/explorerView.ts
+1
-1
src/vs/workbench/services/commands/common/commandService.ts
src/vs/workbench/services/commands/common/commandService.ts
+1
-1
src/vs/workbench/services/extensions/electron-browser/extensionHostProcessManager.ts
...xtensions/electron-browser/extensionHostProcessManager.ts
+1
-1
未找到文件。
src/tsconfig.base.json
浏览文件 @
e2cf8ebc
...
...
@@ -9,6 +9,7 @@
"noUnusedLocals"
:
true
,
"noImplicitThis"
:
true
,
"alwaysStrict"
:
true
,
"strictBindCallApply"
:
true
,
"baseUrl"
:
"."
,
"paths"
:
{
"vs/*"
:
[
...
...
src/vs/base/test/common/winjs.promise.test.ts
浏览文件 @
e2cf8ebc
...
...
@@ -52,7 +52,7 @@ suite('WinJS and ES6 Promises', function () {
let
p1
=
winjs
.
Promise
.
wrap
<
number
>
(
new
Promise
<
number
>
(
function
(
c
,
e
)
{
c
(
1
);
}));
let
thenFunc
=
p1
.
then
.
bind
(
p1
);
setTimeout
(()
=>
{
thenFunc
(()
=>
{
}
);
thenFunc
(()
=>
0
);
},
0
);
});
...
...
@@ -62,7 +62,7 @@ suite('WinJS and ES6 Promises', function () {
let
thenFunc
=
p1
.
then
.
bind
(
p1
);
setTimeout
(()
=>
{
c
(
1
);
thenFunc
(()
=>
{
}
);
thenFunc
(()
=>
0
);
},
0
);
});
});
src/vs/editor/standalone/browser/simpleServices.ts
浏览文件 @
e2cf8ebc
...
...
@@ -242,7 +242,7 @@ export class StandaloneCommandService implements ICommandService {
try
{
this
.
_onWillExecuteCommand
.
fire
({
commandId
:
id
});
const
result
=
this
.
_instantiationService
.
invokeFunction
.
apply
(
this
.
_instantiationService
,
[
command
.
handler
].
concat
(
args
))
;
const
result
=
this
.
_instantiationService
.
invokeFunction
.
apply
(
this
.
_instantiationService
,
[
command
.
handler
,
...
args
])
as
T
;
return
Promise
.
resolve
(
result
);
}
catch
(
err
)
{
return
Promise
.
reject
(
err
);
...
...
src/vs/editor/test/browser/editorTestServices.ts
浏览文件 @
e2cf8ebc
...
...
@@ -44,7 +44,7 @@ export class TestCommandService implements ICommandService {
try
{
this
.
_onWillExecuteCommand
.
fire
({
commandId
:
id
});
const
result
=
this
.
_instantiationService
.
invokeFunction
.
apply
(
this
.
_instantiationService
,
[
command
.
handler
].
concat
(
args
))
;
const
result
=
this
.
_instantiationService
.
invokeFunction
.
apply
(
this
.
_instantiationService
,
[
command
.
handler
,
...
args
])
as
T
;
return
Promise
.
resolve
(
result
);
}
catch
(
err
)
{
return
Promise
.
reject
(
err
);
...
...
src/vs/platform/instantiation/common/instantiationService.ts
浏览文件 @
e2cf8ebc
...
...
@@ -37,7 +37,7 @@ export class InstantiationService implements IInstantiationService {
let
_trace
=
Trace
.
traceInvocation
(
fn
);
let
_done
=
false
;
try
{
let
a
ccessor
=
{
const
accessor
:
ServicesA
ccessor
=
{
get
:
<
T
>
(
id
:
ServiceIdentifier
<
T
>
,
isOptional
?:
typeof
optional
)
=>
{
if
(
_done
)
{
...
...
@@ -51,7 +51,7 @@ export class InstantiationService implements IInstantiationService {
return
result
;
}
};
return
fn
.
apply
(
undefined
,
[
accessor
].
concat
(
args
)
);
return
fn
.
apply
(
undefined
,
[
accessor
,
...
args
]
);
}
finally
{
_done
=
true
;
_trace
.
stop
();
...
...
src/vs/workbench/api/node/extHost.api.impl.ts
浏览文件 @
e2cf8ebc
...
...
@@ -72,7 +72,7 @@ function proposedApiFunction<T>(extension: IExtensionDescription, fn: T): T {
if
(
extension
.
enableProposedApi
)
{
return
fn
;
}
else
{
return
throwProposedApiError
.
bind
(
null
,
extension
);
return
throwProposedApiError
.
bind
(
null
,
extension
)
as
any
as
T
;
}
}
...
...
src/vs/workbench/api/node/extHostFileSystemEventService.ts
浏览文件 @
e2cf8ebc
...
...
@@ -131,9 +131,9 @@ export class ExtHostFileSystemEventService implements ExtHostFileSystemEventServ
getOnWillRenameFileEvent
(
extension
:
IExtensionDescription
):
Event
<
vscode
.
FileWillRenameEvent
>
{
return
(
listener
,
thisArg
,
disposables
)
=>
{
let
wrappedListener
=
<
WillRenameListener
><
any
>
function
()
{
listener
.
apply
(
thisArg
,
arguments
);
};
const
wrappedListener
:
WillRenameListener
=
<
any
>
((
e
:
vscode
.
FileWillRenameEvent
)
=>
{
listener
.
call
(
thisArg
,
e
);
}
)
;
wrappedListener
.
extension
=
extension
;
return
this
.
_onWillRenameFile
.
event
(
wrappedListener
,
undefined
,
disposables
);
};
...
...
src/vs/workbench/browser/parts/views/customView.ts
浏览文件 @
e2cf8ebc
...
...
@@ -451,7 +451,7 @@ export class CustomTreeView extends Disposable implements ITreeView {
getOptimalWidth
():
number
{
if
(
this
.
tree
)
{
const
parentNode
=
this
.
tree
.
getHTMLElement
();
const
childNodes
=
([]
as
Element
[]).
slice
.
call
(
parentNode
.
querySelectorAll
(
'
.outline-item-label > a
'
));
const
childNodes
=
([]
as
HTML
Element
[]).
slice
.
call
(
parentNode
.
querySelectorAll
(
'
.outline-item-label > a
'
));
return
DOM
.
getLargestChildWidth
(
parentNode
,
childNodes
);
}
return
0
;
...
...
src/vs/workbench/node/proxyResolver.ts
浏览文件 @
e2cf8ebc
...
...
@@ -227,7 +227,7 @@ function patches(originals: typeof http | typeof https, agent: http.Agent, setti
const
config
=
onRequest
&&
((
<
any
>
options
).
_vscodeProxySupport
||
/* LS */
(
<
any
>
options
).
_vscodeSystemProxy
)
||
setting
.
config
;
if
(
config
===
'
off
'
)
{
return
original
.
apply
(
null
,
arguments
);
return
original
.
apply
(
null
,
arguments
as
unknown
as
any
[]
);
}
if
(
!
options
.
socketPath
&&
(
config
===
'
override
'
||
config
===
'
on
'
&&
!
options
.
agent
)
&&
options
.
agent
!==
agent
)
{
...
...
@@ -247,7 +247,7 @@ function patches(originals: typeof http | typeof https, agent: http.Agent, setti
return
original
(
options
,
callback
);
}
return
original
.
apply
(
null
,
arguments
);
return
original
.
apply
(
null
,
arguments
as
unknown
as
any
[]
);
}
return
patched
;
}
...
...
src/vs/workbench/parts/files/electron-browser/views/explorerView.ts
浏览文件 @
e2cf8ebc
...
...
@@ -472,7 +472,7 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView
public
getOptimalWidth
():
number
{
const
parentNode
=
this
.
explorerViewer
.
getHTMLElement
();
const
childNodes
=
([]
as
Element
[]).
slice
.
call
(
parentNode
.
querySelectorAll
(
'
.explorer-item .label-name
'
));
// select all file labels
const
childNodes
=
([]
as
HTML
Element
[]).
slice
.
call
(
parentNode
.
querySelectorAll
(
'
.explorer-item .label-name
'
));
// select all file labels
return
DOM
.
getLargestChildWidth
(
parentNode
,
childNodes
);
}
...
...
src/vs/workbench/services/commands/common/commandService.ts
浏览文件 @
e2cf8ebc
...
...
@@ -60,7 +60,7 @@ export class CommandService extends Disposable implements ICommandService {
}
try
{
this
.
_onWillExecuteCommand
.
fire
({
commandId
:
id
});
const
result
=
this
.
_instantiationService
.
invokeFunction
.
apply
(
this
.
_instantiationService
,
[
command
.
handler
].
concat
(
args
)
);
const
result
=
this
.
_instantiationService
.
invokeFunction
.
apply
(
this
.
_instantiationService
,
[
command
.
handler
,
...
args
]
);
return
Promise
.
resolve
(
result
);
}
catch
(
err
)
{
return
Promise
.
reject
(
err
);
...
...
src/vs/workbench/services/extensions/electron-browser/extensionHostProcessManager.ts
浏览文件 @
e2cf8ebc
...
...
@@ -224,7 +224,7 @@ class RPCLogger implements IRPCProtocolLogger {
}
else
{
args
.
push
(
data
);
}
console
.
log
.
apply
(
console
,
args
);
console
.
log
.
apply
(
console
,
args
as
[
string
,
...
string
[]]
);
}
logIncoming
(
msgLength
:
number
,
req
:
number
,
initiator
:
RequestInitiator
,
str
:
string
,
data
?:
any
):
void
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录