Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
428eac30
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 搜索 >>
提交
428eac30
编写于
10月 10, 2018
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adding a few more files to strict null checks
上级
c61e9ecc
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
26 addition
and
16 deletion
+26
-16
src/tsconfig.strictNullChecks.json
src/tsconfig.strictNullChecks.json
+12
-4
src/vs/base/browser/ui/list/rangeMap.ts
src/vs/base/browser/ui/list/rangeMap.ts
+1
-1
src/vs/base/common/strings.ts
src/vs/base/common/strings.ts
+2
-2
src/vs/base/node/decoder.ts
src/vs/base/node/decoder.ts
+2
-2
src/vs/code/electron-main/theme.ts
src/vs/code/electron-main/theme.ts
+1
-1
src/vs/code/node/shellEnv.ts
src/vs/code/node/shellEnv.ts
+2
-2
src/vs/editor/common/model/textModelEvents.ts
src/vs/editor/common/model/textModelEvents.ts
+2
-2
src/vs/editor/standalone/common/monarch/monarchCommon.ts
src/vs/editor/standalone/common/monarch/monarchCommon.ts
+4
-2
未找到文件。
src/tsconfig.strictNullChecks.json
浏览文件 @
428eac30
...
...
@@ -28,18 +28,19 @@
"./vs/base/common/decorators.ts"
,
"./vs/base/common/diff/diff.ts"
,
"./vs/base/common/diff/diffChange.ts"
,
"./vs/base/common/history.ts"
,
"./vs/base/common/errors.ts"
,
"./vs/base/common/event.ts"
,
"./vs/base/common/functional.ts"
,
"./vs/base/common/glob.ts"
,
"./vs/base/common/hash.ts"
,
"./vs/base/common/history.ts"
,
"./vs/base/common/htmlContent.ts"
,
"./vs/base/common/idGenerator.ts"
,
"./vs/base/common/iterator.ts"
,
"./vs/base/common/jsonSchema.ts"
,
"./vs/base/common/keybindingParser.ts"
,
"./vs/base/common/keyCodes.ts"
,
"./vs/base/common/keybindingParser.ts"
,
"./vs/base/common/labels.ts"
,
"./vs/base/common/lifecycle.ts"
,
"./vs/base/common/linkedList.ts"
,
"./vs/base/common/map.ts"
,
...
...
@@ -59,7 +60,6 @@
"./vs/base/common/severity.ts"
,
"./vs/base/common/stopwatch.ts"
,
"./vs/base/common/strings.ts"
,
"./vs/base/common/labels.ts"
,
"./vs/base/common/types.ts"
,
"./vs/base/common/uri.ts"
,
"./vs/base/common/uriIpc.ts"
,
...
...
@@ -67,6 +67,7 @@
"./vs/base/common/uuid.ts"
,
"./vs/base/common/winjs.base.d.ts"
,
"./vs/base/common/worker/simpleWorker.ts"
,
"./vs/base/node/decoder.ts"
,
"./vs/base/node/paths.ts"
,
"./vs/base/node/ports.ts"
,
"./vs/base/parts/contextmenu/common/contextmenu.ts"
,
...
...
@@ -75,6 +76,10 @@
"./vs/base/test/node/uri.test.perf.ts"
,
"./vs/base/worker/defaultWorkerFactory.ts"
,
"./vs/base/worker/workerMain.ts"
,
"./vs/code/electron-browser/issue/issueReporterPage.ts"
,
"./vs/code/electron-browser/issue/issueReporterUtil.ts"
,
"./vs/code/electron-main/theme.ts"
,
"./vs/code/node/shellEnv.ts"
,
"./vs/editor/common/config/editorZoom.ts"
,
"./vs/editor/common/controller/cursorEvents.ts"
,
"./vs/editor/common/controller/wordCharacterClassifier.ts"
,
...
...
@@ -109,10 +114,12 @@
"./vs/platform/files/node/files.ts"
,
"./vs/platform/instantiation/common/descriptors.ts"
,
"./vs/platform/instantiation/common/extensions.ts"
,
"./vs/platform/instantiation/common/graph.ts"
,
"./vs/platform/instantiation/common/instantiation.ts"
,
"./vs/platform/instantiation/common/serviceCollection.ts"
,
"./vs/platform/integrity/common/integrity.ts"
,
"./vs/platform/markers/common/markers.ts"
,
"./vs/platform/node/minimalTranslations.ts"
,
"./vs/platform/node/package.ts"
,
"./vs/platform/node/product.ts"
,
"./vs/platform/opener/common/opener.ts"
,
...
...
@@ -124,6 +131,7 @@
"./vs/workbench/parts/execution/common/execution.ts"
,
"./vs/workbench/parts/logs/common/logConstants.ts"
,
"./vs/workbench/parts/terminal/browser/terminalWidgetManager.ts"
,
"./vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts"
,
"./vs/workbench/services/activity/common/activity.ts"
,
"./vs/workbench/services/configuration/common/jsonEditing.ts"
,
"./vs/workbench/services/extensions/node/lazyPromise.ts"
,
...
...
@@ -136,4 +144,4 @@
"exclude"
:
[
"./typings/require-monaco.d.ts"
]
}
}
\ No newline at end of file
src/vs/base/browser/ui/list/rangeMap.ts
浏览文件 @
428eac30
...
...
@@ -60,7 +60,7 @@ export function shift({ start, end }: IRange, much: number): IRange {
*/
export
function
consolidate
(
groups
:
IRangedGroup
[]):
IRangedGroup
[]
{
const
result
:
IRangedGroup
[]
=
[];
let
previousGroup
:
IRangedGroup
=
null
;
let
previousGroup
:
IRangedGroup
|
null
=
null
;
for
(
let
group
of
groups
)
{
const
start
=
group
.
range
.
start
;
...
...
src/vs/base/common/strings.ts
浏览文件 @
428eac30
...
...
@@ -88,7 +88,7 @@ export function trim(haystack: string, needle: string = ' '): string | undefined
* @param haystack string to trim
* @param needle the thing to trim
*/
export
function
ltrim
(
haystack
?:
string
,
needle
?:
string
):
string
|
undefined
{
export
function
ltrim
(
haystack
:
string
,
needle
:
string
):
string
{
if
(
!
haystack
||
!
needle
)
{
return
haystack
;
}
...
...
@@ -111,7 +111,7 @@ export function ltrim(haystack?: string, needle?: string): string | undefined {
* @param haystack string to trim
* @param needle the thing to trim
*/
export
function
rtrim
(
haystack
?:
string
,
needle
?:
string
):
string
|
undefined
{
export
function
rtrim
(
haystack
:
string
,
needle
:
string
):
string
{
if
(
!
haystack
||
!
needle
)
{
return
haystack
;
}
...
...
src/vs/base/node/decoder.ts
浏览文件 @
428eac30
...
...
@@ -16,7 +16,7 @@ import { CharCode } from 'vs/base/common/charCode';
*/
export
class
LineDecoder
{
private
stringDecoder
:
sd
.
NodeStringDecoder
;
private
remaining
:
string
;
private
remaining
:
string
|
null
;
constructor
(
encoding
:
string
=
'
utf8
'
)
{
this
.
stringDecoder
=
new
sd
.
StringDecoder
(
encoding
);
...
...
@@ -56,7 +56,7 @@ export class LineDecoder {
return
result
;
}
public
end
():
string
{
public
end
():
string
|
null
{
return
this
.
remaining
;
}
}
\ No newline at end of file
src/vs/code/electron-main/theme.ts
浏览文件 @
428eac30
...
...
@@ -19,7 +19,7 @@ export function getBackgroundColor(stateService: IStateService): string {
return
DEFAULT_BG_HC_BLACK
;
}
let
background
=
stateService
.
getItem
<
string
>
(
THEME_BG_STORAGE_KEY
,
null
);
let
background
=
stateService
.
getItem
<
string
|
null
>
(
THEME_BG_STORAGE_KEY
,
null
);
if
(
!
background
)
{
let
baseTheme
:
string
;
if
(
isWindows
&&
systemPreferences
.
isInvertedColorScheme
())
{
...
...
src/vs/code/node/shellEnv.ts
浏览文件 @
428eac30
...
...
@@ -21,7 +21,7 @@ function getUnixShellEnvironment(): Promise<typeof process.env> {
});
const
command
=
`'
${
process
.
execPath
}
' -p '"
${
mark
}
" + JSON.stringify(process.env) + "
${
mark
}
"'`
;
const
child
=
cp
.
spawn
(
process
.
env
.
SHELL
,
[
'
-ilc
'
,
command
],
{
const
child
=
cp
.
spawn
(
process
.
env
.
SHELL
!
,
[
'
-ilc
'
,
command
],
{
detached
:
true
,
stdio
:
[
'
ignore
'
,
'
pipe
'
,
process
.
stderr
],
env
...
...
@@ -66,7 +66,7 @@ function getUnixShellEnvironment(): Promise<typeof process.env> {
});
// swallow errors
return
promise
.
then
(
null
,
()
=>
({}));
return
promise
.
then
(
undefined
,
()
=>
({}));
}
...
...
src/vs/editor/common/model/textModelEvents.ts
浏览文件 @
428eac30
...
...
@@ -238,7 +238,7 @@ export class ModelRawContentChangedEvent {
}
public
static
merge
(
a
:
ModelRawContentChangedEvent
,
b
:
ModelRawContentChangedEvent
):
ModelRawContentChangedEvent
{
const
changes
=
(
<
ModelRawChange
[]
>
[]).
concat
(
a
.
changes
).
concat
(
b
.
changes
);
const
changes
=
(
[]
as
ModelRawChange
[]).
concat
(
a
.
changes
).
concat
(
b
.
changes
);
const
versionId
=
b
.
versionId
;
const
isUndoing
=
(
a
.
isUndoing
||
b
.
isUndoing
);
const
isRedoing
=
(
a
.
isRedoing
||
b
.
isRedoing
);
...
...
@@ -262,7 +262,7 @@ export class InternalModelContentChangeEvent {
}
private
static
_mergeChangeEvents
(
a
:
IModelContentChangedEvent
,
b
:
IModelContentChangedEvent
):
IModelContentChangedEvent
{
const
changes
=
(
<
IModelContentChange
[]
>
[]).
concat
(
a
.
changes
).
concat
(
b
.
changes
);
const
changes
=
(
[]
as
IModelContentChange
[]).
concat
(
a
.
changes
).
concat
(
b
.
changes
);
const
eol
=
b
.
eol
;
const
versionId
=
b
.
versionId
;
const
isUndoing
=
(
a
.
isUndoing
||
b
.
isUndoing
);
...
...
src/vs/editor/standalone/common/monarch/monarchCommon.ts
浏览文件 @
428eac30
...
...
@@ -178,7 +178,8 @@ export function substituteMatches(lexer: ILexerMin, str: string, id: string, mat
/**
* Find the tokenizer rules for a specific state (i.e. next action)
*/
export
function
findRules
(
lexer
:
ILexer
,
state
:
string
|
null
):
IRule
[]
|
null
{
export
function
findRules
(
lexer
:
ILexer
,
inState
:
string
):
IRule
[]
|
null
{
let
state
:
string
|
null
=
inState
;
while
(
state
&&
state
.
length
>
0
)
{
const
rules
=
lexer
.
tokenizer
[
state
];
if
(
rules
)
{
...
...
@@ -200,7 +201,8 @@ export function findRules(lexer: ILexer, state: string | null): IRule[] | null {
* This is used during compilation where we may know the defined states
* but not yet whether the corresponding rules are correct.
*/
export
function
stateExists
(
lexer
:
ILexerMin
,
state
:
string
|
null
):
boolean
{
export
function
stateExists
(
lexer
:
ILexerMin
,
inState
:
string
):
boolean
{
let
state
:
string
|
null
=
inState
;
while
(
state
&&
state
.
length
>
0
)
{
const
exist
=
lexer
.
stateNames
[
state
];
if
(
exist
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录