Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
61168fcf
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,发现更多精彩内容 >>
提交
61168fcf
编写于
7月 10, 2019
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixing / supressing more implict index errors
#76442
上级
6343b113
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
24 addition
and
25 deletion
+24
-25
src/vs/base/common/types.ts
src/vs/base/common/types.ts
+2
-2
src/vs/code/electron-main/window.ts
src/vs/code/electron-main/window.ts
+4
-3
src/vs/editor/standalone/browser/standaloneLanguages.ts
src/vs/editor/standalone/browser/standaloneLanguages.ts
+2
-5
src/vs/workbench/browser/parts/editor/editorStatus.ts
src/vs/workbench/browser/parts/editor/editorStatus.ts
+1
-1
src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts
.../workbench/contrib/preferences/browser/settingsEditor2.ts
+4
-3
src/vs/workbench/contrib/preferences/browser/settingsTree.ts
src/vs/workbench/contrib/preferences/browser/settingsTree.ts
+9
-10
src/vs/workbench/contrib/preferences/electron-browser/preferencesSearch.ts
...contrib/preferences/electron-browser/preferencesSearch.ts
+2
-1
未找到文件。
src/vs/base/common/types.ts
浏览文件 @
61168fcf
...
...
@@ -170,9 +170,9 @@ export function getAllPropertyNames(obj: object): string[] {
}
export
function
getAllMethodNames
(
obj
:
object
):
string
[]
{
le
t
methods
:
string
[]
=
[];
cons
t
methods
:
string
[]
=
[];
for
(
const
prop
of
getAllPropertyNames
(
obj
))
{
if
(
typeof
obj
[
prop
]
===
'
function
'
)
{
if
(
typeof
(
obj
as
any
)
[
prop
]
===
'
function
'
)
{
methods
.
push
(
prop
);
}
}
...
...
src/vs/code/electron-main/window.ts
浏览文件 @
61168fcf
...
...
@@ -584,9 +584,10 @@ export class CodeWindow extends Disposable implements ICodeWindow {
// Config (combination of process.argv and window configuration)
const
environment
=
parseArgs
(
process
.
argv
);
const
config
=
objects
.
assign
(
environment
,
windowConfiguration
);
for
(
let
key
in
config
)
{
if
(
config
[
key
]
===
undefined
||
config
[
key
]
===
null
||
config
[
key
]
===
''
||
config
[
key
]
===
false
)
{
delete
config
[
key
];
// only send over properties that have a true value
for
(
const
key
in
config
)
{
const
configValue
=
(
config
as
any
)[
key
];
if
(
configValue
===
undefined
||
configValue
===
null
||
configValue
===
''
||
configValue
===
false
)
{
delete
(
config
as
any
)[
key
];
// only send over properties that have a true value
}
}
...
...
src/vs/editor/standalone/browser/standaloneLanguages.ts
浏览文件 @
61168fcf
...
...
@@ -290,14 +290,11 @@ export interface EncodedTokensProvider {
}
function
isEncodedTokensProvider
(
provider
:
TokensProvider
|
EncodedTokensProvider
):
provider
is
EncodedTokensProvider
{
return
provider
[
'
tokenizeEncoded
'
]
;
return
'
tokenizeEncoded
'
in
provider
;
}
function
isThenable
<
T
>
(
obj
:
any
):
obj
is
Thenable
<
T
>
{
if
(
typeof
obj
.
then
===
'
function
'
)
{
return
true
;
}
return
false
;
return
obj
&&
typeof
obj
.
then
===
'
function
'
;
}
/**
...
...
src/vs/workbench/browser/parts/editor/editorStatus.ts
浏览文件 @
61168fcf
...
...
@@ -1018,7 +1018,7 @@ export class ChangeModeAction extends Action {
// If the association is already being made in the workspace, make sure to target workspace settings
let
target
=
ConfigurationTarget
.
USER
;
if
(
fileAssociationsConfig
.
workspace
&&
!!
fileAssociationsConfig
.
workspace
[
associationKey
])
{
if
(
fileAssociationsConfig
.
workspace
&&
!!
(
fileAssociationsConfig
.
workspace
as
any
)
[
associationKey
])
{
target
=
ConfigurationTarget
.
WORKSPACE
;
}
...
...
src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts
浏览文件 @
61168fcf
...
...
@@ -1117,11 +1117,12 @@ export class SettingsEditor2 extends BaseEditor {
const
nlpResult
=
results
[
SearchResultIdx
.
Remote
];
const
nlpMetadata
=
nlpResult
&&
nlpResult
.
metadata
;
const
durations
=
{};
durations
[
'
nlpResult
'
]
=
nlpMetadata
&&
nlpMetadata
.
duration
;
const
durations
=
{
nlpResult
:
nlpMetadata
&&
nlpMetadata
.
duration
};
// Count unique results
const
counts
=
{};
const
counts
:
{
nlpResult
?:
number
,
filterResult
?:
number
}
=
{};
const
filterResult
=
results
[
SearchResultIdx
.
Local
];
if
(
filterResult
)
{
counts
[
'
filterResult
'
]
=
filterResult
.
filterMatches
.
length
;
...
...
src/vs/workbench/contrib/preferences/browser/settingsTree.ts
浏览文件 @
61168fcf
...
...
@@ -702,17 +702,16 @@ export class SettingExcludeRenderer extends AbstractSettingRenderer implements I
}
}
const
sortKeys
=
(
obj
:
Object
)
=>
{
const
keyArray
=
Object
.
keys
(
obj
)
.
map
(
key
=>
({
key
,
val
:
obj
[
key
]
}))
.
sort
((
a
,
b
)
=>
a
.
key
.
localeCompare
(
b
.
key
));
const
retVal
=
{};
keyArray
.
forEach
(
pair
=>
{
retVal
[
pair
.
key
]
=
pair
.
val
;
});
function
sortKeys
<
T
extends
object
>
(
obj
:
T
)
{
const
sortedKeys
=
Object
.
keys
(
obj
)
.
sort
((
a
,
b
)
=>
a
.
localeCompare
(
b
))
as
Array
<
keyof
T
>
;
const
retVal
:
Partial
<
T
>
=
{};
for
(
const
key
of
sortedKeys
)
{
retVal
[
key
]
=
obj
[
key
];
}
return
retVal
;
}
;
}
this
.
_onDidChangeSetting
.
fire
({
key
:
template
.
context
.
setting
.
key
,
...
...
src/vs/workbench/contrib/preferences/electron-browser/preferencesSearch.ts
浏览文件 @
61168fcf
...
...
@@ -19,6 +19,7 @@ import { ExtensionType } from 'vs/platform/extensions/common/extensions';
import
{
nullRange
}
from
'
vs/workbench/services/preferences/common/preferencesModels
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
PreferencesSearchService
as
LocalPreferencesSearchService
,
SettingMatches
}
from
'
vs/workbench/contrib/preferences/browser/preferencesSearch
'
;
import
{
IStringDictionary
}
from
'
vs/base/common/collections
'
;
export
interface
IEndpointDetails
{
urlBase
?:
string
;
...
...
@@ -252,7 +253,7 @@ class RemoteSearchProvider implements ISearchProvider {
}
const
requestType
=
details
.
body
?
'
post
'
:
'
get
'
;
const
headers
=
{
const
headers
:
IStringDictionary
<
string
>
=
{
'
User-Agent
'
:
'
request
'
,
'
Content-Type
'
:
'
application/json; charset=utf-8
'
,
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录