Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
cd00b590
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,发现更多精彩内容 >>
提交
cd00b590
编写于
11月 06, 2017
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Enable strict in a few more extensions
上级
de137dd8
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
27 addition
and
26 deletion
+27
-26
extensions/configuration-editing/src/extension.ts
extensions/configuration-editing/src/extension.ts
+1
-1
extensions/configuration-editing/src/settingsDocumentHelper.ts
...sions/configuration-editing/src/settingsDocumentHelper.ts
+1
-1
extensions/configuration-editing/tsconfig.json
extensions/configuration-editing/tsconfig.json
+1
-1
extensions/merge-conflict/src/commandHandler.ts
extensions/merge-conflict/src/commandHandler.ts
+13
-13
extensions/merge-conflict/src/delayer.ts
extensions/merge-conflict/src/delayer.ts
+3
-3
extensions/merge-conflict/src/interfaces.ts
extensions/merge-conflict/src/interfaces.ts
+4
-4
extensions/merge-conflict/tsconfig.json
extensions/merge-conflict/tsconfig.json
+1
-1
extensions/vscode-colorize-tests/src/colorizer.test.ts
extensions/vscode-colorize-tests/src/colorizer.test.ts
+1
-1
extensions/vscode-colorize-tests/tsconfig.json
extensions/vscode-colorize-tests/tsconfig.json
+2
-1
未找到文件。
extensions/configuration-editing/src/extension.ts
浏览文件 @
cd00b590
...
...
@@ -19,7 +19,7 @@ const decoration = vscode.window.createTextEditorDecorationType({
let
pendingLaunchJsonDecoration
:
NodeJS
.
Timer
;
export
function
activate
(
context
):
void
{
export
function
activate
(
context
:
vscode
.
ExtensionContext
):
void
{
//keybindings.json command-suggestions
context
.
subscriptions
.
push
(
registerKeybindingsCompletions
());
...
...
extensions/configuration-editing/src/settingsDocumentHelper.ts
浏览文件 @
cd00b590
...
...
@@ -149,7 +149,7 @@ export class SettingsDocument {
return
Promise
.
resolve
(
completions
);
}
private
provideLanguageCompletionItems
(
location
:
Location
,
range
:
vscode
.
Range
,
formatFunc
:
(
string
)
=>
string
=
(
l
)
=>
JSON
.
stringify
(
l
)):
vscode
.
ProviderResult
<
vscode
.
CompletionItem
[]
>
{
private
provideLanguageCompletionItems
(
location
:
Location
,
range
:
vscode
.
Range
,
formatFunc
:
(
string
:
string
)
=>
string
=
(
l
)
=>
JSON
.
stringify
(
l
)):
vscode
.
ProviderResult
<
vscode
.
CompletionItem
[]
>
{
return
vscode
.
languages
.
getLanguages
().
then
(
languages
=>
{
return
languages
.
map
(
l
=>
{
return
this
.
newSimpleCompletionItem
(
formatFunc
(
l
),
range
);
...
...
extensions/configuration-editing/tsconfig.json
浏览文件 @
cd00b590
...
...
@@ -6,7 +6,7 @@
"lib"
:
[
"es2015"
],
"strict
NullChecks
"
:
true
"strict"
:
true
},
"include"
:
[
"src/**/*"
...
...
extensions/merge-conflict/src/commandHandler.ts
浏览文件 @
cd00b590
...
...
@@ -43,38 +43,38 @@ export default class CommandHandler implements vscode.Disposable {
);
}
private
registerTextEditorCommand
(
command
:
string
,
cb
:
(
editor
:
vscode
.
TextEditor
,
...
args
)
=>
Promise
<
void
>
)
{
private
registerTextEditorCommand
(
command
:
string
,
cb
:
(
editor
:
vscode
.
TextEditor
,
...
args
:
any
[]
)
=>
Promise
<
void
>
)
{
return
vscode
.
commands
.
registerCommand
(
command
,
(...
args
)
=>
{
const
editor
=
vscode
.
window
.
activeTextEditor
;
return
editor
&&
cb
.
call
(
this
,
editor
,
...
args
);
});
}
acceptCurrent
(
editor
:
vscode
.
TextEditor
,
...
args
):
Promise
<
void
>
{
acceptCurrent
(
editor
:
vscode
.
TextEditor
,
...
args
:
any
[]
):
Promise
<
void
>
{
return
this
.
accept
(
interfaces
.
CommitType
.
Current
,
editor
,
...
args
);
}
acceptIncoming
(
editor
:
vscode
.
TextEditor
,
...
args
):
Promise
<
void
>
{
acceptIncoming
(
editor
:
vscode
.
TextEditor
,
...
args
:
any
[]
):
Promise
<
void
>
{
return
this
.
accept
(
interfaces
.
CommitType
.
Incoming
,
editor
,
...
args
);
}
acceptBoth
(
editor
:
vscode
.
TextEditor
,
...
args
):
Promise
<
void
>
{
acceptBoth
(
editor
:
vscode
.
TextEditor
,
...
args
:
any
[]
):
Promise
<
void
>
{
return
this
.
accept
(
interfaces
.
CommitType
.
Both
,
editor
,
...
args
);
}
acceptAllCurrent
(
editor
:
vscode
.
TextEditor
,
...
args
):
Promise
<
void
>
{
acceptAllCurrent
(
editor
:
vscode
.
TextEditor
,
...
args
:
any
[]
):
Promise
<
void
>
{
return
this
.
acceptAll
(
interfaces
.
CommitType
.
Current
,
editor
);
}
acceptAllIncoming
(
editor
:
vscode
.
TextEditor
,
...
args
):
Promise
<
void
>
{
acceptAllIncoming
(
editor
:
vscode
.
TextEditor
,
...
args
:
any
[]
):
Promise
<
void
>
{
return
this
.
acceptAll
(
interfaces
.
CommitType
.
Incoming
,
editor
);
}
acceptAllBoth
(
editor
:
vscode
.
TextEditor
,
...
args
):
Promise
<
void
>
{
acceptAllBoth
(
editor
:
vscode
.
TextEditor
,
...
args
:
any
[]
):
Promise
<
void
>
{
return
this
.
acceptAll
(
interfaces
.
CommitType
.
Both
,
editor
);
}
async
compare
(
editor
:
vscode
.
TextEditor
,
conflict
:
interfaces
.
IDocumentMergeConflict
|
null
,
...
args
)
{
async
compare
(
editor
:
vscode
.
TextEditor
,
conflict
:
interfaces
.
IDocumentMergeConflict
|
null
,
...
args
:
any
[]
)
{
const
fileName
=
path
.
basename
(
editor
.
document
.
uri
.
fsPath
);
// No conflict, command executed from command palette
...
...
@@ -102,15 +102,15 @@ export default class CommandHandler implements vscode.Disposable {
vscode
.
commands
.
executeCommand
(
'
vscode.diff
'
,
leftUri
,
rightUri
,
title
);
}
navigateNext
(
editor
:
vscode
.
TextEditor
,
...
args
):
Promise
<
void
>
{
navigateNext
(
editor
:
vscode
.
TextEditor
,
...
args
:
any
[]
):
Promise
<
void
>
{
return
this
.
navigate
(
editor
,
NavigationDirection
.
Forwards
);
}
navigatePrevious
(
editor
:
vscode
.
TextEditor
,
...
args
):
Promise
<
void
>
{
navigatePrevious
(
editor
:
vscode
.
TextEditor
,
...
args
:
any
[]
):
Promise
<
void
>
{
return
this
.
navigate
(
editor
,
NavigationDirection
.
Backwards
);
}
async
acceptSelection
(
editor
:
vscode
.
TextEditor
,
...
args
):
Promise
<
void
>
{
async
acceptSelection
(
editor
:
vscode
.
TextEditor
,
...
args
:
any
[]
):
Promise
<
void
>
{
let
conflict
=
await
this
.
findConflictContainingSelection
(
editor
);
if
(
!
conflict
)
{
...
...
@@ -175,7 +175,7 @@ export default class CommandHandler implements vscode.Disposable {
editor
.
revealRange
(
navigationResult
.
conflict
.
range
,
vscode
.
TextEditorRevealType
.
Default
);
}
private
async
accept
(
type
:
interfaces
.
CommitType
,
editor
:
vscode
.
TextEditor
,
...
args
):
Promise
<
void
>
{
private
async
accept
(
type
:
interfaces
.
CommitType
,
editor
:
vscode
.
TextEditor
,
...
args
:
any
[]
):
Promise
<
void
>
{
let
conflict
:
interfaces
.
IDocumentMergeConflict
|
null
;
...
...
@@ -257,7 +257,7 @@ export default class CommandHandler implements vscode.Disposable {
};
}
let
predicate
:
(
conflict
)
=>
boolean
;
let
predicate
:
(
_conflict
:
any
)
=>
boolean
;
let
fallback
:
()
=>
interfaces
.
IDocumentMergeConflict
;
if
(
direction
===
NavigationDirection
.
Forwards
)
{
...
...
extensions/merge-conflict/src/delayer.ts
浏览文件 @
cd00b590
...
...
@@ -13,7 +13,7 @@ export class Delayer<T> {
public
defaultDelay
:
number
;
private
timeout
:
any
;
// Timer
private
completionPromise
:
Promise
<
T
>
|
null
;
private
onSuccess
:
((
value
?:
T
|
Thenable
<
T
>
|
null
)
=>
void
)
|
null
;
private
onSuccess
:
((
value
?:
T
|
Thenable
<
T
>
|
undefined
)
=>
void
)
|
null
;
private
task
:
ITask
<
T
>
|
null
;
constructor
(
defaultDelay
:
number
)
{
...
...
@@ -45,7 +45,7 @@ export class Delayer<T> {
if
(
delay
>=
0
||
this
.
timeout
===
null
)
{
this
.
timeout
=
setTimeout
(()
=>
{
this
.
timeout
=
null
;
this
.
onSuccess
!
(
null
);
this
.
onSuccess
!
(
undefined
);
},
delay
>=
0
?
delay
:
this
.
defaultDelay
);
}
...
...
@@ -58,7 +58,7 @@ export class Delayer<T> {
}
this
.
cancelTimeout
();
let
result
=
this
.
completionPromise
;
this
.
onSuccess
!
(
null
);
this
.
onSuccess
!
(
undefined
);
return
result
;
}
...
...
extensions/merge-conflict/src/interfaces.ts
浏览文件 @
cd00b590
...
...
@@ -24,8 +24,8 @@ export interface IExtensionConfiguration {
}
export
interface
IDocumentMergeConflict
extends
IDocumentMergeConflictDescriptor
{
commitEdit
(
type
:
CommitType
,
editor
:
vscode
.
TextEditor
,
edit
?:
vscode
.
TextEditorEdit
);
applyEdit
(
type
:
CommitType
,
editor
:
vscode
.
TextEditor
,
edit
:
vscode
.
TextEditorEdit
);
commitEdit
(
type
:
CommitType
,
editor
:
vscode
.
TextEditor
,
edit
?:
vscode
.
TextEditorEdit
)
:
Thenable
<
boolean
>
;
applyEdit
(
type
:
CommitType
,
editor
:
vscode
.
TextEditor
,
edit
:
vscode
.
TextEditorEdit
)
:
void
;
}
export
interface
IDocumentMergeConflictDescriptor
{
...
...
@@ -39,10 +39,10 @@ export interface IDocumentMergeConflictDescriptor {
export
interface
IDocumentMergeConflictTracker
{
getConflicts
(
document
:
vscode
.
TextDocument
):
PromiseLike
<
IDocumentMergeConflict
[]
>
;
isPending
(
document
:
vscode
.
TextDocument
):
boolean
;
forget
(
document
:
vscode
.
TextDocument
);
forget
(
document
:
vscode
.
TextDocument
)
:
void
;
}
export
interface
IDocumentMergeConflictTrackerService
{
createTracker
(
origin
:
string
):
IDocumentMergeConflictTracker
;
forget
(
document
:
vscode
.
TextDocument
);
forget
(
document
:
vscode
.
TextDocument
)
:
void
;
}
extensions/merge-conflict/tsconfig.json
浏览文件 @
cd00b590
...
...
@@ -6,7 +6,7 @@
],
"module"
:
"commonjs"
,
"outDir"
:
"./out"
,
"strict
NullChecks
"
:
true
,
"strict"
:
true
,
"experimentalDecorators"
:
true
},
"include"
:
[
...
...
extensions/vscode-colorize-tests/src/colorizer.test.ts
浏览文件 @
cd00b590
...
...
@@ -10,7 +10,7 @@ import { commands, Uri } from 'vscode';
import
{
join
,
basename
,
normalize
,
dirname
}
from
'
path
'
;
import
*
as
fs
from
'
fs
'
;
function
assertUnchangedTokens
(
testFixurePath
:
string
,
done
)
{
function
assertUnchangedTokens
(
testFixurePath
:
string
,
done
:
any
)
{
let
fileName
=
basename
(
testFixurePath
);
return
commands
.
executeCommand
(
'
_workbench.captureSyntaxTokens
'
,
Uri
.
file
(
testFixurePath
)).
then
(
data
=>
{
...
...
extensions/vscode-colorize-tests/tsconfig.json
浏览文件 @
cd00b590
...
...
@@ -6,7 +6,8 @@
"lib"
:
[
"es2015"
],
"sourceMap"
:
true
"sourceMap"
:
true
,
"strict"
:
true
},
"include"
:
[
"src/**/*"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录