Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
c419355b
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,发现更多精彩内容 >>
未验证
提交
c419355b
编写于
6月 14, 2019
作者:
M
Matt Bierner
提交者:
GitHub
6月 14, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #75375 from microsoft/dev/mjbvz/vscode-api-readonly-events
Mark events as readonly in VS Code api
上级
7751dd0b
b4f6130f
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
41 addition
and
41 deletion
+41
-41
extensions/grunt/src/main.ts
extensions/grunt/src/main.ts
+1
-1
extensions/gulp/src/main.ts
extensions/gulp/src/main.ts
+1
-1
extensions/html-language-features/client/src/tagClosing.ts
extensions/html-language-features/client/src/tagClosing.ts
+1
-1
extensions/jake/src/main.ts
extensions/jake/src/main.ts
+1
-1
extensions/typescript-language-features/src/features/bufferSyncSupport.ts
...cript-language-features/src/features/bufferSyncSupport.ts
+2
-2
extensions/typescript-language-features/src/features/tagClosing.ts
...s/typescript-language-features/src/features/tagClosing.ts
+1
-1
src/vs/vscode.d.ts
src/vs/vscode.d.ts
+30
-30
src/vs/vscode.proposed.d.ts
src/vs/vscode.proposed.d.ts
+3
-3
src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts
...ectron-browser/api/extHostDocumentSaveParticipant.test.ts
+1
-1
未找到文件。
extensions/grunt/src/main.ts
浏览文件 @
c419355b
...
...
@@ -230,7 +230,7 @@ class TaskDetector {
this
.
detectors
.
clear
();
}
private
updateWorkspaceFolders
(
added
:
vscode
.
WorkspaceFolder
[],
removed
:
vscode
.
WorkspaceFolder
[]):
void
{
private
updateWorkspaceFolders
(
added
:
readonly
vscode
.
WorkspaceFolder
[],
removed
:
readonly
vscode
.
WorkspaceFolder
[]):
void
{
for
(
let
remove
of
removed
)
{
let
detector
=
this
.
detectors
.
get
(
remove
.
uri
.
toString
());
if
(
detector
)
{
...
...
extensions/gulp/src/main.ts
浏览文件 @
c419355b
...
...
@@ -209,7 +209,7 @@ class TaskDetector {
this
.
detectors
.
clear
();
}
private
updateWorkspaceFolders
(
added
:
vscode
.
WorkspaceFolder
[],
removed
:
vscode
.
WorkspaceFolder
[]):
void
{
private
updateWorkspaceFolders
(
added
:
readonly
vscode
.
WorkspaceFolder
[],
removed
:
readonly
vscode
.
WorkspaceFolder
[]):
void
{
for
(
let
remove
of
removed
)
{
let
detector
=
this
.
detectors
.
get
(
remove
.
uri
.
toString
());
if
(
detector
)
{
...
...
extensions/html-language-features/client/src/tagClosing.ts
浏览文件 @
c419355b
...
...
@@ -32,7 +32,7 @@ export function activateTagClosing(tagProvider: (document: TextDocument, positio
isEnabled
=
true
;
}
function
onDidChangeTextDocument
(
document
:
TextDocument
,
changes
:
TextDocumentContentChangeEvent
[])
{
function
onDidChangeTextDocument
(
document
:
TextDocument
,
changes
:
readonly
TextDocumentContentChangeEvent
[])
{
if
(
!
isEnabled
)
{
return
;
}
...
...
extensions/jake/src/main.ts
浏览文件 @
c419355b
...
...
@@ -208,7 +208,7 @@ class TaskDetector {
this
.
detectors
.
clear
();
}
private
updateWorkspaceFolders
(
added
:
vscode
.
WorkspaceFolder
[],
removed
:
vscode
.
WorkspaceFolder
[]):
void
{
private
updateWorkspaceFolders
(
added
:
readonly
vscode
.
WorkspaceFolder
[],
removed
:
readonly
vscode
.
WorkspaceFolder
[]):
void
{
for
(
let
remove
of
removed
)
{
let
detector
=
this
.
detectors
.
get
(
remove
.
uri
.
toString
());
if
(
detector
)
{
...
...
extensions/typescript-language-features/src/features/bufferSyncSupport.ts
浏览文件 @
c419355b
...
...
@@ -75,7 +75,7 @@ class BufferSynchronizer {
}
}
public
change
(
filepath
:
string
,
events
:
vscode
.
TextDocumentContentChangeEvent
[])
{
public
change
(
filepath
:
string
,
events
:
readonly
vscode
.
TextDocumentContentChangeEvent
[])
{
if
(
!
events
.
length
)
{
return
;
}
...
...
@@ -210,7 +210,7 @@ class SyncedBuffer {
this
.
state
=
BufferState
.
Closed
;
}
public
onContentChanged
(
events
:
vscode
.
TextDocumentContentChangeEvent
[]):
void
{
public
onContentChanged
(
events
:
readonly
vscode
.
TextDocumentContentChangeEvent
[]):
void
{
if
(
this
.
state
!==
BufferState
.
Open
)
{
console
.
error
(
`Unexpected buffer state:
${
this
.
state
}
`
);
}
...
...
extensions/typescript-language-features/src/features/tagClosing.ts
浏览文件 @
c419355b
...
...
@@ -46,7 +46,7 @@ class TagClosing extends Disposable {
private
onDidChangeTextDocument
(
document
:
vscode
.
TextDocument
,
changes
:
vscode
.
TextDocumentContentChangeEvent
[]
changes
:
readonly
vscode
.
TextDocumentContentChangeEvent
[]
)
{
const
activeDocument
=
vscode
.
window
.
activeTextEditor
&&
vscode
.
window
.
activeTextEditor
.
document
;
if
(
document
!==
activeDocument
||
changes
.
length
===
0
)
{
...
...
src/vs/vscode.d.ts
浏览文件 @
c419355b
...
...
@@ -531,16 +531,16 @@ declare module 'vscode' {
/**
* The [text editor](#TextEditor) for which the selections have changed.
*/
textEditor
:
TextEditor
;
readonly
textEditor
:
TextEditor
;
/**
* The new value for the [text editor's selections](#TextEditor.selections).
*/
selections
:
Selection
[]
;
readonly
selections
:
ReadonlyArray
<
Selection
>
;
/**
* The [change kind](#TextEditorSelectionChangeKind) which has triggered this
* event. Can be `undefined`.
*/
kind
?:
TextEditorSelectionChangeKind
;
readonly
kind
?:
TextEditorSelectionChangeKind
;
}
/**
...
...
@@ -550,11 +550,11 @@ declare module 'vscode' {
/**
* The [text editor](#TextEditor) for which the visible ranges have changed.
*/
textEditor
:
TextEditor
;
readonly
textEditor
:
TextEditor
;
/**
* The new value for the [text editor's visible ranges](#TextEditor.visibleRanges).
*/
visibleRanges
:
Range
[]
;
readonly
visibleRanges
:
ReadonlyArray
<
Range
>
;
}
/**
...
...
@@ -564,11 +564,11 @@ declare module 'vscode' {
/**
* The [text editor](#TextEditor) for which the options have changed.
*/
textEditor
:
TextEditor
;
readonly
textEditor
:
TextEditor
;
/**
* The new value for the [text editor's options](#TextEditor.options).
*/
options
:
TextEditorOptions
;
readonly
options
:
TextEditorOptions
;
}
/**
...
...
@@ -578,11 +578,11 @@ declare module 'vscode' {
/**
* The [text editor](#TextEditor) for which the view column has changed.
*/
textEditor
:
TextEditor
;
readonly
textEditor
:
TextEditor
;
/**
* The new value for the [text editor's view column](#TextEditor.viewColumn).
*/
viewColumn
:
ViewColumn
;
readonly
viewColumn
:
ViewColumn
;
}
/**
...
...
@@ -4203,7 +4203,7 @@ declare module 'vscode' {
/**
* An array of resources for which diagnostics have changed.
*/
readonly
uris
:
Uri
[]
;
readonly
uris
:
ReadonlyArray
<
Uri
>
;
}
/**
...
...
@@ -5331,7 +5331,7 @@ declare module 'vscode' {
/**
* The task item representing the task that got started.
*/
execution
:
TaskExecution
;
readonly
execution
:
TaskExecution
;
}
/**
...
...
@@ -5343,7 +5343,7 @@ declare module 'vscode' {
/**
* The task item representing the task that finished.
*/
execution
:
TaskExecution
;
readonly
execution
:
TaskExecution
;
}
/**
...
...
@@ -5355,12 +5355,12 @@ declare module 'vscode' {
/**
* The task execution for which the process got started.
*/
execution
:
TaskExecution
;
readonly
execution
:
TaskExecution
;
/**
* The underlying process id.
*/
processId
:
number
;
readonly
processId
:
number
;
}
/**
...
...
@@ -5372,12 +5372,12 @@ declare module 'vscode' {
/**
* The task execution for which the process got started.
*/
execution
:
TaskExecution
;
readonly
execution
:
TaskExecution
;
/**
* The process's exit code.
*/
exitCode
:
number
;
readonly
exitCode
:
number
;
}
export
interface
TaskFilter
{
...
...
@@ -5584,12 +5584,12 @@ declare module 'vscode' {
/**
* The type of change.
*/
type
:
FileChangeType
;
readonly
type
:
FileChangeType
;
/**
* The uri of the file that has changed.
*/
uri
:
Uri
;
readonly
uri
:
Uri
;
}
/**
...
...
@@ -7331,12 +7331,12 @@ declare module 'vscode' {
/**
* The affected document.
*/
document
:
TextDocument
;
readonly
document
:
TextDocument
;
/**
* An array of content changes.
*/
contentChanges
:
TextDocumentContentChangeEvent
[]
;
readonly
contentChanges
:
ReadonlyArray
<
TextDocumentContentChangeEvent
>
;
}
/**
...
...
@@ -7373,12 +7373,12 @@ declare module 'vscode' {
/**
* The document that will be saved.
*/
document
:
TextDocument
;
readonly
document
:
TextDocument
;
/**
* The reason why save was triggered.
*/
reason
:
TextDocumentSaveReason
;
rea
donly
rea
son
:
TextDocumentSaveReason
;
/**
* Allows to pause the event loop and to apply [pre-save-edits](#TextEdit).
...
...
@@ -7419,12 +7419,12 @@ declare module 'vscode' {
/**
* Added workspace folders.
*/
readonly
added
:
WorkspaceFolder
[]
;
readonly
added
:
ReadonlyArray
<
WorkspaceFolder
>
;
/**
* Removed workspace folders.
*/
readonly
removed
:
WorkspaceFolder
[]
;
readonly
removed
:
ReadonlyArray
<
WorkspaceFolder
>
;
}
/**
...
...
@@ -8500,17 +8500,17 @@ declare module 'vscode' {
/**
* The [debug session](#DebugSession) for which the custom event was received.
*/
session
:
DebugSession
;
readonly
session
:
DebugSession
;
/**
* Type of event.
*/
event
:
string
;
readonly
event
:
string
;
/**
* Event specific information.
*/
body
?:
any
;
readonly
body
?:
any
;
}
/**
...
...
@@ -8707,17 +8707,17 @@ declare module 'vscode' {
/**
* Added breakpoints.
*/
readonly
added
:
Breakpoint
[]
;
readonly
added
:
ReadonlyArray
<
Breakpoint
>
;
/**
* Removed breakpoints.
*/
readonly
removed
:
Breakpoint
[]
;
readonly
removed
:
ReadonlyArray
<
Breakpoint
>
;
/**
* Changed breakpoints.
*/
readonly
changed
:
Breakpoint
[]
;
readonly
changed
:
ReadonlyArray
<
Breakpoint
>
;
}
/**
...
...
src/vs/vscode.proposed.d.ts
浏览文件 @
c419355b
...
...
@@ -822,17 +822,17 @@ declare module 'vscode' {
/**
* Added comment threads.
*/
readonly
added
:
CommentThread
[]
;
readonly
added
:
ReadonlyArray
<
CommentThread
>
;
/**
* Removed comment threads.
*/
readonly
removed
:
CommentThread
[]
;
readonly
removed
:
ReadonlyArray
<
CommentThread
>
;
/**
* Changed comment threads.
*/
readonly
changed
:
CommentThread
[]
;
readonly
changed
:
ReadonlyArray
<
CommentThread
>
;
/**
* Changed draft mode
...
...
src/vs/workbench/test/electron-browser/api/extHostDocumentSaveParticipant.test.ts
浏览文件 @
c419355b
...
...
@@ -85,7 +85,7 @@ suite('ExtHostDocumentSaveParticipant', () => {
sub
.
dispose
();
assert
.
ok
(
event
);
assert
.
throws
(()
=>
{
event
.
document
=
null
!
;
});
assert
.
throws
(()
=>
{
(
event
.
document
as
any
)
=
null
!
;
});
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录