Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
e5f5df78
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,发现更多精彩内容 >>
提交
e5f5df78
编写于
10月 17, 2016
作者:
Y
Yuki Ueda
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use readonly #12732
上级
265803b0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
32 addition
and
43 deletion
+32
-43
src/vs/vscode.d.ts
src/vs/vscode.d.ts
+32
-32
src/vs/workbench/test/node/api/extHostDocuments.test.ts
src/vs/workbench/test/node/api/extHostDocuments.test.ts
+0
-11
未找到文件。
src/vs/vscode.d.ts
浏览文件 @
e5f5df78
...
...
@@ -48,28 +48,28 @@ declare module 'vscode' {
*
* @readonly
*/
lineNumber
:
number
;
readonly
lineNumber
:
number
;
/**
* The text of this line without the line separator characters.
*
* @readonly
*/
text
:
string
;
readonly
text
:
string
;
/**
* The range this line covers without the line separator characters.
*
* @readonly
*/
range
:
Range
;
r
eadonly
r
ange
:
Range
;
/**
* The range this line covers with the line separator characters.
*
* @readonly
*/
rangeIncludingLineBreak
:
Range
;
r
eadonly
r
angeIncludingLineBreak
:
Range
;
/**
* The offset of the first character which is not a whitespace character as defined
...
...
@@ -77,7 +77,7 @@ declare module 'vscode' {
*
* @readonly
*/
firstNonWhitespaceCharacterIndex
:
number
;
readonly
firstNonWhitespaceCharacterIndex
:
number
;
/**
* Whether this line is whitespace only, shorthand
...
...
@@ -85,7 +85,7 @@ declare module 'vscode' {
*
* @readonly
*/
isEmptyOrWhitespace
:
boolean
;
readonly
isEmptyOrWhitespace
:
boolean
;
}
/**
...
...
@@ -101,7 +101,7 @@ declare module 'vscode' {
*
* @readonly
*/
uri
:
Uri
;
readonly
uri
:
Uri
;
/**
* The file system path of the associated resource. Shorthand
...
...
@@ -109,21 +109,21 @@ declare module 'vscode' {
*
* @readonly
*/
fileName
:
string
;
readonly
fileName
:
string
;
/**
* Is this document representing an untitled file.
*
* @readonly
*/
isUntitled
:
boolean
;
readonly
isUntitled
:
boolean
;
/**
* The identifier of the language associated with this document.
*
* @readonly
*/
languageId
:
string
;
readonly
languageId
:
string
;
/**
* The version number of this document (it will strictly increase after each
...
...
@@ -131,14 +131,14 @@ declare module 'vscode' {
*
* @readonly
*/
version
:
number
;
readonly
version
:
number
;
/**
* true if there are unpersisted changes.
*
* @readonly
*/
isDirty
:
boolean
;
readonly
isDirty
:
boolean
;
/**
* Save the underlying file.
...
...
@@ -154,7 +154,7 @@ declare module 'vscode' {
*
* @readonly
*/
lineCount
:
number
;
readonly
lineCount
:
number
;
/**
* Returns a text line denoted by the line number. Note
...
...
@@ -251,13 +251,13 @@ declare module 'vscode' {
* The zero-based line value.
* @readonly
*/
line
:
number
;
readonly
line
:
number
;
/**
* The zero-based character value.
* @readonly
*/
character
:
number
;
readonly
character
:
number
;
/**
* @param line A zero-based line value.
...
...
@@ -372,13 +372,13 @@ declare module 'vscode' {
* The start position. It is before or equal to [end](#Range.end).
* @readonly
*/
start
:
Position
;
readonly
start
:
Position
;
/**
* The end position. It is after or equal to [start](#Range.start).
* @readonly
*/
end
:
Position
;
readonly
end
:
Position
;
/**
* Create a new range from two positions. If `start` is not
...
...
@@ -658,7 +658,7 @@ declare module 'vscode' {
* Internal representation of the handle.
* @readonly
*/
key
:
string
;
readonly
key
:
string
;
/**
* Remove this decoration type and all decorations on all text editors using it.
...
...
@@ -1545,7 +1545,7 @@ declare module 'vscode' {
*
* @readonly
*/
diagnostics
:
Diagnostic
[];
readonly
diagnostics
:
Diagnostic
[];
}
/**
...
...
@@ -2007,7 +2007,7 @@ declare module 'vscode' {
*
* @readonly
*/
size
:
number
;
readonly
size
:
number
;
/**
* Replace the given range with given text for the given resource.
...
...
@@ -2852,7 +2852,7 @@ declare module 'vscode' {
* Readable dictionary that backs this configuration.
* @readonly
*/
[
key
:
string
]:
any
;
readonly
[
key
:
string
]:
any
;
}
/**
...
...
@@ -2967,7 +2967,7 @@ declare module 'vscode' {
* name when defining [problem matchers](https://code.visualstudio.com/docs/editor/tasks#_defining-a-problem-matcher).
* @readonly
*/
name
:
string
;
readonly
name
:
string
;
/**
* Assign diagnostics for given resource. Will replace
...
...
@@ -3059,7 +3059,7 @@ declare module 'vscode' {
* The human-readable name of this output channel.
* @readonly
*/
name
:
string
;
readonly
name
:
string
;
/**
* Append the given value to the channel.
...
...
@@ -3137,7 +3137,7 @@ declare module 'vscode' {
*
* @readonly
*/
alignment
:
StatusBarAlignment
;
readonly
alignment
:
StatusBarAlignment
;
/**
* The priority of this item. Higher value means the item should
...
...
@@ -3145,7 +3145,7 @@ declare module 'vscode' {
*
* @readonly
*/
priority
:
number
;
readonly
priority
:
number
;
/**
* The text to show for the entry. You can embed icons in the text by leveraging the syntax:
...
...
@@ -3200,14 +3200,14 @@ declare module 'vscode' {
*
* @readonly
*/
name
:
string
;
readonly
name
:
string
;
/**
* The process ID of the shell process.
*
* @readonly
*/
processId
:
Thenable
<
number
>
;
readonly
processId
:
Thenable
<
number
>
;
/**
* Send text to the terminal. The text is written to the stdin of the underlying pty process
...
...
@@ -3250,28 +3250,28 @@ declare module 'vscode' {
*
* @readonly
*/
id
:
string
;
readonly
id
:
string
;
/**
* The absolute file path of the directory containing this extension.
*
* @readonly
*/
extensionPath
:
string
;
readonly
extensionPath
:
string
;
/**
* `true` if the extension has been activated.
*
* @readonly
*/
isActive
:
boolean
;
readonly
isActive
:
boolean
;
/**
* The parsed contents of the extension's package.json.
*
* @readonly
*/
packageJSON
:
any
;
readonly
packageJSON
:
any
;
/**
* The public API exported by this extension. It is an invalid action
...
...
@@ -3279,7 +3279,7 @@ declare module 'vscode' {
*
* @readonly
*/
exports
:
T
;
readonly
exports
:
T
;
/**
* Activates this extension and returns its public API.
...
...
src/vs/workbench/test/node/api/extHostDocuments.test.ts
浏览文件 @
e5f5df78
...
...
@@ -38,20 +38,9 @@ suite('ExtHostDocument', () => {
],
'
\n
'
,
'
text
'
,
1
,
false
);
});
test
(
'
readonly-ness
'
,
function
()
{
assert
.
throws
(()
=>
data
.
document
.
uri
=
null
);
assert
.
throws
(()
=>
data
.
document
.
fileName
=
'
foofile
'
);
assert
.
throws
(()
=>
data
.
document
.
isDirty
=
false
);
assert
.
throws
(()
=>
data
.
document
.
isUntitled
=
false
);
assert
.
throws
(()
=>
data
.
document
.
languageId
=
'
dddd
'
);
assert
.
throws
(()
=>
data
.
document
.
lineCount
=
9
);
});
test
(
'
lines
'
,
function
()
{
assert
.
equal
(
data
.
document
.
lineCount
,
4
);
assert
.
throws
(()
=>
data
.
document
.
lineCount
=
9
);
assert
.
throws
(()
=>
data
.
lineAt
(
-
1
));
assert
.
throws
(()
=>
data
.
lineAt
(
data
.
document
.
lineCount
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录