Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
8235163d
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,体验更适合开发者的 AI 搜索 >>
提交
8235163d
编写于
3月 21, 2019
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More implicitAny fixes
上级
0999096b
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
27 addition
and
26 deletion
+27
-26
src/vs/base/common/types.ts
src/vs/base/common/types.ts
+1
-1
src/vs/code/electron-main/windows.ts
src/vs/code/electron-main/windows.ts
+1
-1
src/vs/platform/extensionManagement/common/extensionManagementUtil.ts
...orm/extensionManagement/common/extensionManagementUtil.ts
+1
-1
src/vs/platform/extensionManagement/node/extensionLifecycle.ts
...s/platform/extensionManagement/node/extensionLifecycle.ts
+1
-1
src/vs/platform/extensionManagement/node/extensionManagementIpc.ts
...atform/extensionManagement/node/extensionManagementIpc.ts
+2
-2
src/vs/workbench/api/electron-browser/mainThreadWebview.ts
src/vs/workbench/api/electron-browser/mainThreadWebview.ts
+2
-2
src/vs/workbench/api/node/extHostQuickOpen.ts
src/vs/workbench/api/node/extHostQuickOpen.ts
+3
-3
src/vs/workbench/api/node/extHostTreeViews.ts
src/vs/workbench/api/node/extHostTreeViews.ts
+3
-2
src/vs/workbench/browser/nodeless.simpleservices.ts
src/vs/workbench/browser/nodeless.simpleservices.ts
+3
-3
src/vs/workbench/browser/parts/quickinput/quickInput.ts
src/vs/workbench/browser/parts/quickinput/quickInput.ts
+1
-1
src/vs/workbench/common/actions.ts
src/vs/workbench/common/actions.ts
+4
-4
src/vs/workbench/contrib/comments/electron-browser/commentThreadWidget.ts
.../contrib/comments/electron-browser/commentThreadWidget.ts
+1
-1
src/vs/workbench/contrib/tasks/electron-browser/task.contribution.ts
...bench/contrib/tasks/electron-browser/task.contribution.ts
+4
-4
未找到文件。
src/vs/base/common/types.ts
浏览文件 @
8235163d
...
...
@@ -174,7 +174,7 @@ export function create(ctor: Function, ...args: any[]): any {
}
// https://stackoverflow.com/a/32235645/1499159
function
isNativeClass
(
thing
):
boolean
{
function
isNativeClass
(
thing
:
any
):
boolean
{
return
typeof
thing
===
'
function
'
&&
thing
.
hasOwnProperty
(
'
prototype
'
)
&&
!
thing
.
hasOwnProperty
(
'
arguments
'
);
...
...
src/vs/code/electron-main/windows.ts
浏览文件 @
8235163d
...
...
@@ -746,7 +746,7 @@ export class WindowsManager implements IWindowsMainService {
private
doOpenFilesInExistingWindow
(
configuration
:
IOpenConfiguration
,
window
:
ICodeWindow
,
fileInputs
?:
IFileInputs
):
ICodeWindow
{
window
.
focus
();
// make sure window has focus
const
params
:
{
filesToOpen
?
,
filesToCreate
?,
filesToDiff
?,
filesToWait
?,
termProgram
?
}
=
{};
const
params
:
{
filesToOpen
?
:
IPath
[],
filesToCreate
?:
IPath
[],
filesToDiff
?:
IPath
[],
filesToWait
?:
IPathsToWaitFor
,
termProgram
?:
string
}
=
{};
if
(
fileInputs
)
{
params
.
filesToOpen
=
fileInputs
.
filesToOpen
;
params
.
filesToCreate
=
fileInputs
.
filesToCreate
;
...
...
src/vs/platform/extensionManagement/common/extensionManagementUtil.ts
浏览文件 @
8235163d
...
...
@@ -26,7 +26,7 @@ export function getGalleryExtensionId(publisher: string, name: string): string {
export
function
groupByExtension
<
T
>
(
extensions
:
T
[],
getExtensionIdentifier
:
(
t
:
T
)
=>
IExtensionIdentifier
):
T
[][]
{
const
byExtension
:
T
[][]
=
[];
const
findGroup
=
extension
=>
{
const
findGroup
=
(
extension
:
T
)
=>
{
for
(
const
group
of
byExtension
)
{
if
(
group
.
some
(
e
=>
areSameExtensions
(
getExtensionIdentifier
(
e
),
getExtensionIdentifier
(
extension
))))
{
return
group
;
...
...
src/vs/platform/extensionManagement/node/extensionLifecycle.ts
浏览文件 @
8235163d
...
...
@@ -54,7 +54,7 @@ export class ExtensionsLifecycle extends Disposable {
return
new
Promise
<
void
>
((
c
,
e
)
=>
{
const
extensionLifecycleProcess
=
this
.
start
(
lifecycleHook
,
lifecycleType
,
args
,
extension
);
let
timeoutHandler
;
let
timeoutHandler
:
any
;
const
onexit
=
(
error
?:
string
)
=>
{
if
(
timeoutHandler
)
{
...
...
src/vs/platform/extensionManagement/node/extensionManagementIpc.ts
浏览文件 @
8235163d
...
...
@@ -44,7 +44,7 @@ export class ExtensionManagementChannel implements IServerChannel {
this
.
onDidUninstallExtension
=
Event
.
buffer
(
service
.
onDidUninstallExtension
,
true
);
}
listen
(
context
,
event
:
string
):
Event
<
any
>
{
listen
(
context
:
any
,
event
:
string
):
Event
<
any
>
{
const
uriTransformer
=
this
.
getUriTransformer
(
context
);
switch
(
event
)
{
case
'
onInstallExtension
'
:
return
this
.
onInstallExtension
;
...
...
@@ -56,7 +56,7 @@ export class ExtensionManagementChannel implements IServerChannel {
throw
new
Error
(
'
Invalid listen
'
);
}
call
(
context
,
command
:
string
,
args
?:
any
):
Promise
<
any
>
{
call
(
context
:
any
,
command
:
string
,
args
?:
any
):
Promise
<
any
>
{
const
uriTransformer
:
IURITransformer
|
null
=
this
.
getUriTransformer
(
context
);
switch
(
command
)
{
case
'
zip
'
:
return
this
.
service
.
zip
(
transformIncomingExtension
(
args
[
0
],
uriTransformer
)).
then
(
uri
=>
transformOutgoingURI
(
uri
,
uriTransformer
));
...
...
src/vs/workbench/api/electron-browser/mainThreadWebview.ts
浏览文件 @
8235163d
...
...
@@ -272,8 +272,8 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews
private
createWebviewEventDelegate
(
handle
:
WebviewPanelHandle
)
{
return
{
onDidClickLink
:
uri
=>
this
.
onDidClickLink
(
handle
,
uri
),
onMessage
:
message
=>
this
.
_proxy
.
$onMessage
(
handle
,
message
),
onDidClickLink
:
(
uri
:
URI
)
=>
this
.
onDidClickLink
(
handle
,
uri
),
onMessage
:
(
message
:
any
)
=>
this
.
_proxy
.
$onMessage
(
handle
,
message
),
onDispose
:
()
=>
{
this
.
_proxy
.
$onDidDisposeWebviewPanel
(
handle
).
finally
(()
=>
{
this
.
_webviews
.
delete
(
handle
);
...
...
src/vs/workbench/api/node/extHostQuickOpen.ts
浏览文件 @
8235163d
...
...
@@ -175,13 +175,13 @@ export class ExtHostQuickOpen implements ExtHostQuickOpenShape {
// ---- QuickInput
createQuickPick
<
T
extends
QuickPickItem
>
(
extensionId
:
ExtensionIdentifier
,
enableProposedApi
:
boolean
):
QuickPick
<
T
>
{
const
session
=
new
ExtHostQuickPick
(
this
.
_proxy
,
extensionId
,
enableProposedApi
,
()
=>
this
.
_sessions
.
delete
(
session
.
_id
));
const
session
:
ExtHostQuickPick
<
T
>
=
new
ExtHostQuickPick
(
this
.
_proxy
,
extensionId
,
enableProposedApi
,
()
=>
this
.
_sessions
.
delete
(
session
.
_id
));
this
.
_sessions
.
set
(
session
.
_id
,
session
);
return
session
;
}
createInputBox
(
extensionId
:
ExtensionIdentifier
):
InputBox
{
const
session
=
new
ExtHostInputBox
(
this
.
_proxy
,
extensionId
,
()
=>
this
.
_sessions
.
delete
(
session
.
_id
));
const
session
:
ExtHostInputBox
=
new
ExtHostInputBox
(
this
.
_proxy
,
extensionId
,
()
=>
this
.
_sessions
.
delete
(
session
.
_id
));
this
.
_sessions
.
set
(
session
.
_id
,
session
);
return
session
;
}
...
...
@@ -379,7 +379,7 @@ class ExtHostQuickInput implements QuickInput {
this
.
_onDidAcceptEmitter
.
fire
();
}
_fireDidChangeValue
(
value
)
{
_fireDidChangeValue
(
value
:
string
)
{
this
.
_value
=
value
;
this
.
_onDidChangeValueEmitter
.
fire
(
value
);
}
...
...
src/vs/workbench/api/node/extHostTreeViews.ts
浏览文件 @
8235163d
...
...
@@ -186,7 +186,8 @@ class ExtHostTreeView<T> extends Disposable {
this
.
_register
(
this
.
dataProvider
.
onDidChangeTreeData
(
element
=>
this
.
_onDidChangeData
.
fire
({
message
:
false
,
element
})));
}
let
refreshingPromise
,
promiseCallback
;
let
refreshingPromise
:
Promise
<
void
>
|
null
;
let
promiseCallback
:
()
=>
void
;
this
.
_register
(
Event
.
debounce
<
TreeData
<
T
>
,
{
message
:
boolean
,
elements
:
(
T
|
Root
)[]
}
>
(
this
.
_onDidChangeData
.
event
,
(
result
,
current
)
=>
{
if
(
!
result
)
{
result
=
{
message
:
false
,
elements
:
[]
};
...
...
@@ -195,7 +196,7 @@ class ExtHostTreeView<T> extends Disposable {
if
(
!
refreshingPromise
)
{
// New refresh has started
refreshingPromise
=
new
Promise
(
c
=>
promiseCallback
=
c
);
this
.
refreshPromise
=
this
.
refreshPromise
.
then
(()
=>
refreshingPromise
);
this
.
refreshPromise
=
this
.
refreshPromise
.
then
(()
=>
refreshingPromise
!
);
}
result
.
elements
.
push
(
current
.
element
);
}
...
...
src/vs/workbench/browser/nodeless.simpleservices.ts
浏览文件 @
8235163d
...
...
@@ -791,7 +791,7 @@ export class SimpleRemoteFileService implements IFileService {
return
Promise
.
resolve
(
createFolder
(
parent
,
basename
(
_resource
.
path
)));
}
registerProvider
(
_scheme
:
string
,
_provider
)
{
return
{
dispose
()
{
}
};
}
registerProvider
()
{
return
{
dispose
()
{
}
};
}
activateProvider
(
_scheme
:
string
):
Promise
<
void
>
{
return
Promise
.
resolve
(
undefined
);
}
...
...
@@ -1059,14 +1059,14 @@ export const IRequestService = createDecorator<IRequestService>('requestService'
export
interface
IRequestService
{
_serviceBrand
:
any
;
request
(
options
,
token
:
CancellationToken
):
Promise
<
object
>
;
request
(
options
:
any
,
token
:
CancellationToken
):
Promise
<
object
>
;
}
export
class
SimpleRequestService
implements
IRequestService
{
_serviceBrand
:
any
;
request
(
options
,
token
:
CancellationToken
):
Promise
<
object
>
{
request
(
options
:
any
,
token
:
CancellationToken
):
Promise
<
object
>
{
return
Promise
.
resolve
(
Object
.
create
(
null
));
}
}
...
...
src/vs/workbench/browser/parts/quickinput/quickInput.ts
浏览文件 @
8235163d
...
...
@@ -309,7 +309,7 @@ class QuickPick<T extends IQuickPickItem> extends QuickInput implements IQuickPi
private
static
INPUT_BOX_ARIA_LABEL
=
localize
(
'
quickInputBox.ariaLabel
'
,
"
Type to narrow down results.
"
);
private
_value
=
''
;
private
_placeholder
;
private
_placeholder
:
string
;
private
onDidChangeValueEmitter
=
new
Emitter
<
string
>
();
private
onDidAcceptEmitter
=
new
Emitter
<
void
>
();
private
_items
:
Array
<
T
|
IQuickPickSeparator
>
=
[];
...
...
src/vs/workbench/common/actions.ts
浏览文件 @
8235163d
...
...
@@ -6,7 +6,7 @@
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
KeybindingsRegistry
,
KeybindingWeight
}
from
'
vs/platform/keybinding/common/keybindingsRegistry
'
;
import
{
ICommandHandler
,
CommandsRegistry
}
from
'
vs/platform/commands/common/commands
'
;
import
{
SyncActionDescriptor
,
MenuRegistry
,
MenuId
}
from
'
vs/platform/actions/common/actions
'
;
import
{
SyncActionDescriptor
,
MenuRegistry
,
MenuId
,
ICommandAction
}
from
'
vs/platform/actions/common/actions
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IDisposable
,
combinedDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
ILifecycleService
,
LifecyclePhase
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
...
...
@@ -58,16 +58,16 @@ Registry.add(Extensions.WorkbenchActions, new class implements IWorkbenchActionR
if
(
descriptor
.
label
)
{
let
idx
=
alias
.
indexOf
(
'
:
'
);
let
categoryOriginal
;
let
categoryOriginal
=
''
;
if
(
idx
>
0
)
{
categoryOriginal
=
alias
.
substr
(
0
,
idx
);
alias
=
alias
.
substr
(
idx
+
2
);
}
const
command
=
{
const
command
:
ICommandAction
=
{
id
:
descriptor
.
id
,
title
:
{
value
:
descriptor
.
label
,
original
:
alias
},
category
:
category
&&
{
value
:
category
,
original
:
categoryOriginal
}
category
:
category
?
{
value
:
category
,
original
:
categoryOriginal
}
:
undefined
};
MenuRegistry
.
addCommand
(
command
);
...
...
src/vs/workbench/contrib/comments/electron-browser/commentThreadWidget.ts
浏览文件 @
8235163d
...
...
@@ -60,7 +60,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
private
_resizeObserver
:
any
;
private
_onDidClose
=
new
Emitter
<
ReviewZoneWidget
|
undefined
>
();
private
_onDidCreateThread
=
new
Emitter
<
ReviewZoneWidget
>
();
private
_isCollapsed
;
private
_isCollapsed
:
boolean
;
private
_collapseAction
:
Action
;
private
_commentGlyph
?:
CommentGlyphWidget
;
private
_submitActionsDisposables
:
IDisposable
[];
...
...
src/vs/workbench/contrib/tasks/electron-browser/task.contribution.ts
浏览文件 @
8235163d
...
...
@@ -156,9 +156,9 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem {
const
info
=
document
.
createElement
(
'
div
'
);
const
building
=
document
.
createElement
(
'
div
'
);
const
errorTitle
=
n
=>
nls
.
localize
(
'
totalErrors
'
,
"
{0} Errors
"
,
n
);
const
warningTitle
=
n
=>
nls
.
localize
(
'
totalWarnings
'
,
"
{0} Warnings
"
,
n
);
const
infoTitle
=
n
=>
nls
.
localize
(
'
totalInfos
'
,
"
{0} Infos
"
,
n
);
const
errorTitle
=
(
n
:
number
)
=>
nls
.
localize
(
'
totalErrors
'
,
"
{0} Errors
"
,
n
);
const
warningTitle
=
(
n
:
number
)
=>
nls
.
localize
(
'
totalWarnings
'
,
"
{0} Warnings
"
,
n
);
const
infoTitle
=
(
n
:
number
)
=>
nls
.
localize
(
'
totalInfos
'
,
"
{0} Infos
"
,
n
);
Dom
.
addClass
(
element
,
'
task-statusbar-item
'
);
element
.
title
=
nls
.
localize
(
'
problems
'
,
"
Problems
"
);
...
...
@@ -211,7 +211,7 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem {
}));
const
manyProblems
=
nls
.
localize
(
'
manyProblems
'
,
"
10K+
"
);
const
packNumber
=
n
=>
n
>
9999
?
manyProblems
:
n
>
999
?
n
.
toString
().
charAt
(
0
)
+
'
K
'
:
n
.
toString
();
const
packNumber
=
(
n
:
number
)
=>
n
>
9999
?
manyProblems
:
n
>
999
?
n
.
toString
().
charAt
(
0
)
+
'
K
'
:
n
.
toString
();
let
updateLabel
=
(
stats
:
MarkerStatistics
)
=>
{
error
.
innerHTML
=
packNumber
(
stats
.
errors
);
error
.
title
=
errorIcon
.
title
=
errorTitle
(
stats
.
errors
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录