Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
4315160d
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,发现更多精彩内容 >>
提交
4315160d
编写于
10月 07, 2016
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove more code that supported Compatibility Modes
上级
9e05f824
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
17 addition
and
321 deletion
+17
-321
src/vs/editor/browser/standalone/standaloneLanguages.ts
src/vs/editor/browser/standalone/standaloneLanguages.ts
+0
-1
src/vs/editor/common/modes/lineStream.ts
src/vs/editor/common/modes/lineStream.ts
+2
-3
src/vs/editor/common/modes/modesRegistry.ts
src/vs/editor/common/modes/modesRegistry.ts
+0
-32
src/vs/editor/common/services/languagesRegistry.ts
src/vs/editor/common/services/languagesRegistry.ts
+1
-41
src/vs/editor/common/services/modeService.ts
src/vs/editor/common/services/modeService.ts
+0
-1
src/vs/editor/common/services/modeServiceImpl.ts
src/vs/editor/common/services/modeServiceImpl.ts
+7
-58
src/vs/editor/test/common/mocks/mockModeService.ts
src/vs/editor/test/common/mocks/mockModeService.ts
+0
-80
src/vs/editor/test/common/services/languagesRegistry.test.ts
src/vs/editor/test/common/services/languagesRegistry.test.ts
+7
-21
src/vs/platform/instantiation/common/descriptors.ts
src/vs/platform/instantiation/common/descriptors.ts
+0
-84
未找到文件。
src/vs/editor/browser/standalone/standaloneLanguages.ts
浏览文件 @
4315160d
...
...
@@ -37,7 +37,6 @@ export function register(language:ILanguageExtensionPoint): void {
export
function
getLanguages
():
ILanguageExtensionPoint
[]
{
let
result
:
ILanguageExtensionPoint
[]
=
[];
result
=
result
.
concat
(
ModesRegistry
.
getLanguages
());
result
=
result
.
concat
(
ModesRegistry
.
getCompatModes
());
return
result
;
}
...
...
src/vs/editor/common/modes/lineStream.ts
浏览文件 @
4315160d
...
...
@@ -50,12 +50,11 @@ export class LineStream {
/**
* Advances the stream by `n` characters.
*/
public
advance
(
n
:
number
):
number
{
public
advance
(
n
:
number
):
void
{
if
(
n
===
0
)
{
return
n
;
return
;
}
this
.
_pos
+=
n
;
return
n
;
}
/**
...
...
src/vs/editor/common/modes/modesRegistry.ts
浏览文件 @
4315160d
...
...
@@ -9,18 +9,6 @@ import Event, {Emitter} from 'vs/base/common/event';
import
{
Registry
}
from
'
vs/platform/platform
'
;
import
{
ILanguageExtensionPoint
}
from
'
vs/editor/common/services/modeService
'
;
export
interface
ILegacyLanguageDefinition
{
id
:
string
;
extensions
:
string
[];
filenames
?:
string
[];
firstLine
?:
string
;
aliases
:
string
[];
mimetypes
:
string
[];
moduleId
:
string
;
ctorName
:
string
;
deps
?:
string
[];
}
// Define extension point ids
export
var
Extensions
=
{
ModesRegistry
:
'
editor.modesRegistry
'
...
...
@@ -28,35 +16,15 @@ export var Extensions = {
export
class
EditorModesRegistry
{
private
_compatModes
:
ILegacyLanguageDefinition
[];
private
_languages
:
ILanguageExtensionPoint
[];
private
_onDidAddCompatModes
:
Emitter
<
ILegacyLanguageDefinition
[]
>
=
new
Emitter
<
ILegacyLanguageDefinition
[]
>
();
public
onDidAddCompatModes
:
Event
<
ILegacyLanguageDefinition
[]
>
=
this
.
_onDidAddCompatModes
.
event
;
private
_onDidAddLanguages
:
Emitter
<
ILanguageExtensionPoint
[]
>
=
new
Emitter
<
ILanguageExtensionPoint
[]
>
();
public
onDidAddLanguages
:
Event
<
ILanguageExtensionPoint
[]
>
=
this
.
_onDidAddLanguages
.
event
;
constructor
()
{
this
.
_compatModes
=
[];
this
.
_languages
=
[];
}
// --- compat modes
public
registerCompatModes
(
def
:
ILegacyLanguageDefinition
[]):
void
{
this
.
_compatModes
=
this
.
_compatModes
.
concat
(
def
);
this
.
_onDidAddCompatModes
.
fire
(
def
);
}
public
registerCompatMode
(
def
:
ILegacyLanguageDefinition
):
void
{
this
.
_compatModes
.
push
(
def
);
this
.
_onDidAddCompatModes
.
fire
([
def
]);
}
public
getCompatModes
():
ILegacyLanguageDefinition
[]
{
return
this
.
_compatModes
.
slice
(
0
);
}
// --- languages
public
registerLanguage
(
def
:
ILanguageExtensionPoint
):
void
{
...
...
src/vs/editor/common/services/languagesRegistry.ts
浏览文件 @
4315160d
...
...
@@ -8,17 +8,11 @@ import {onUnexpectedError} from 'vs/base/common/errors';
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
import
*
as
mime
from
'
vs/base/common/mime
'
;
import
*
as
strings
from
'
vs/base/common/strings
'
;
import
{
ILegacyLanguageDefinition
,
ModesRegistry
}
from
'
vs/editor/common/modes/modesRegistry
'
;
import
{
ModesRegistry
}
from
'
vs/editor/common/modes/modesRegistry
'
;
import
{
ILanguageExtensionPoint
}
from
'
vs/editor/common/services/modeService
'
;
var
hasOwnProperty
=
Object
.
prototype
.
hasOwnProperty
;
export
interface
ICompatModeDescriptor
{
moduleId
:
string
;
ctorName
:
string
;
deps
:
string
[];
}
export
class
LanguagesRegistry
{
private
knownModeIds
:
{
[
id
:
string
]:
boolean
;
};
...
...
@@ -27,7 +21,6 @@ export class LanguagesRegistry {
private
id2Name
:
{
[
id
:
string
]:
string
;
};
private
id2Extensions
:
{
[
id
:
string
]:
string
[];
};
private
id2Filenames
:
{
[
id
:
string
]:
string
[];
};
private
compatModes
:
{
[
id
:
string
]:
ICompatModeDescriptor
;
};
private
lowerName2Id
:
{
[
name
:
string
]:
string
;
};
private
id2ConfigurationFiles
:
{
[
id
:
string
]:
string
[];
};
...
...
@@ -41,44 +34,15 @@ export class LanguagesRegistry {
this
.
id2Name
=
{};
this
.
id2Extensions
=
{};
this
.
id2Filenames
=
{};
this
.
compatModes
=
{};
this
.
lowerName2Id
=
{};
this
.
id2ConfigurationFiles
=
{};
if
(
useModesRegistry
)
{
this
.
_registerCompatModes
(
ModesRegistry
.
getCompatModes
());
ModesRegistry
.
onDidAddCompatModes
((
m
)
=>
this
.
_registerCompatModes
(
m
));
this
.
_registerLanguages
(
ModesRegistry
.
getLanguages
());
ModesRegistry
.
onDidAddLanguages
((
m
)
=>
this
.
_registerLanguages
(
m
));
}
}
_registerCompatModes
(
defs
:
ILegacyLanguageDefinition
[]):
void
{
let
addedModes
:
string
[]
=
[];
for
(
let
i
=
0
;
i
<
defs
.
length
;
i
++
)
{
let
def
=
defs
[
i
];
this
.
_registerLanguage
({
id
:
def
.
id
,
extensions
:
def
.
extensions
,
filenames
:
def
.
filenames
,
firstLine
:
def
.
firstLine
,
aliases
:
def
.
aliases
,
mimetypes
:
def
.
mimetypes
});
this
.
compatModes
[
def
.
id
]
=
{
moduleId
:
def
.
moduleId
,
ctorName
:
def
.
ctorName
,
deps
:
def
.
deps
};
addedModes
.
push
(
def
.
id
);
}
this
.
_onDidAddModes
.
fire
(
addedModes
);
}
_registerLanguages
(
desc
:
ILanguageExtensionPoint
[]):
void
{
let
addedModes
:
string
[]
=
[];
for
(
let
i
=
0
;
i
<
desc
.
length
;
i
++
)
{
...
...
@@ -263,10 +227,6 @@ export class LanguagesRegistry {
return
this
.
extractModeIds
(
mimeTypes
.
join
(
'
,
'
));
}
public
getCompatMode
(
modeId
:
string
):
ICompatModeDescriptor
{
return
this
.
compatModes
[
modeId
]
||
null
;
}
public
getExtensions
(
languageName
:
string
):
string
[]
{
let
languageId
=
this
.
name2LanguageId
[
languageName
];
if
(
!
languageId
)
{
...
...
src/vs/editor/common/services/modeService.ts
浏览文件 @
4315160d
...
...
@@ -46,7 +46,6 @@ export interface IModeService {
// --- reading
isRegisteredMode
(
mimetypeOrModeId
:
string
):
boolean
;
isCompatMode
(
modeId
:
string
):
boolean
;
getRegisteredModes
():
string
[];
getRegisteredLanguageNames
():
string
[];
getExtensions
(
alias
:
string
):
string
[];
...
...
src/vs/editor/common/services/modeServiceImpl.ts
浏览文件 @
4315160d
...
...
@@ -11,7 +11,6 @@ import * as paths from 'vs/base/common/paths';
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
mime
=
require
(
'
vs/base/common/mime
'
);
import
{
IFilesConfiguration
}
from
'
vs/platform/files/common/files
'
;
import
{
createAsyncDescriptor1
}
from
'
vs/platform/instantiation/common/descriptors
'
;
import
{
IExtensionService
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
IExtensionPointUser
,
IExtensionMessageCollector
,
ExtensionsRegistry
}
from
'
vs/platform/extensions/common/extensionsRegistry
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
...
...
@@ -137,7 +136,6 @@ export class ModeServiceImpl implements IModeService {
private
_instantiationService
:
IInstantiationService
;
protected
_extensionService
:
IExtensionService
;
private
_activationPromises
:
{
[
modeId
:
string
]:
TPromise
<
modes
.
IMode
>
;
};
private
_instantiatedModes
:
{
[
modeId
:
string
]:
modes
.
IMode
;
};
private
_registry
:
LanguagesRegistry
;
...
...
@@ -155,7 +153,6 @@ export class ModeServiceImpl implements IModeService {
this
.
_instantiationService
=
instantiationService
;
this
.
_extensionService
=
extensionService
;
this
.
_activationPromises
=
{};
this
.
_instantiatedModes
=
{};
this
.
_registry
=
new
LanguagesRegistry
();
...
...
@@ -166,11 +163,6 @@ export class ModeServiceImpl implements IModeService {
return
this
.
_registry
.
isRegisteredMode
(
mimetypeOrModeId
);
}
public
isCompatMode
(
modeId
:
string
):
boolean
{
let
compatModeData
=
this
.
_registry
.
getCompatMode
(
modeId
);
return
(
compatModeData
?
true
:
false
);
}
public
getRegisteredModes
():
string
[]
{
return
this
.
_registry
.
getRegisteredModes
();
}
...
...
@@ -300,61 +292,18 @@ export class ModeServiceImpl implements IModeService {
});
}
private
_getOrCreateMode
(
modeId
:
string
):
TPromise
<
modes
.
IMode
>
{
if
(
this
.
_instantiatedModes
.
hasOwnProperty
(
modeId
))
{
return
TPromise
.
as
(
this
.
_instantiatedModes
[
modeId
]);
}
if
(
this
.
_activationPromises
.
hasOwnProperty
(
modeId
))
{
return
this
.
_activationPromises
[
modeId
];
}
var
c
,
e
;
var
promise
=
new
TPromise
((
cc
,
ee
,
pp
)
=>
{
c
=
cc
;
e
=
ee
;
});
this
.
_activationPromises
[
modeId
]
=
promise
;
this
.
_createMode
(
modeId
).
then
((
mode
)
=>
{
this
.
_instantiatedModes
[
modeId
]
=
mode
;
delete
this
.
_activationPromises
[
modeId
];
private
_getOrCreateMode
(
modeId
:
string
):
modes
.
IMode
{
if
(
!
this
.
_instantiatedModes
.
hasOwnProperty
(
modeId
))
{
this
.
_instantiatedModes
[
modeId
]
=
this
.
_instantiationService
.
createInstance
(
FrankensteinMode
,
{
id
:
modeId
});
this
.
_onDidCreateMode
.
fire
(
mode
);
this
.
_onDidCreateMode
.
fire
(
this
.
_instantiatedModes
[
modeId
]
);
this
.
_extensionService
.
activateByEvent
(
`onLanguage:
${
modeId
}
`
).
done
(
null
,
onUnexpectedError
);
return
this
.
_instantiatedModes
[
modeId
];
}).
then
(
c
,
e
);
return
promise
;
}
private
_createMode
(
modeId
:
string
):
TPromise
<
modes
.
IMode
>
{
let
modeDescriptor
=
this
.
_createModeDescriptor
(
modeId
);
let
compatModeData
=
this
.
_registry
.
getCompatMode
(
modeId
);
if
(
compatModeData
)
{
// This is a compatibility mode
let
resolvedDeps
:
TPromise
<
modes
.
IMode
[]
>
=
null
;
if
(
Array
.
isArray
(
compatModeData
.
deps
))
{
resolvedDeps
=
TPromise
.
join
(
compatModeData
.
deps
.
map
(
dep
=>
this
.
getOrCreateMode
(
dep
)));
}
else
{
resolvedDeps
=
TPromise
.
as
<
modes
.
IMode
[]
>
(
null
);
}
return
resolvedDeps
.
then
(
_
=>
{
let
compatModeAsyncDescriptor
=
createAsyncDescriptor1
<
modes
.
IModeDescriptor
,
modes
.
IMode
>
(
compatModeData
.
moduleId
,
compatModeData
.
ctorName
);
return
this
.
_instantiationService
.
createInstance
(
compatModeAsyncDescriptor
,
modeDescriptor
);
});
}
return
TPromise
.
as
<
modes
.
IMode
>
(
this
.
_instantiationService
.
createInstance
(
FrankensteinMode
,
modeDescriptor
));
}
private
_createModeDescriptor
(
modeId
:
string
):
modes
.
IModeDescriptor
{
return
{
id
:
modeId
};
return
this
.
_instantiatedModes
[
modeId
];
}
}
export
class
TokenizationState2Adapter
implements
modes
.
IState
{
...
...
src/vs/editor/test/common/mocks/mockModeService.ts
已删除
100644 → 0
浏览文件 @
9e05f824
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
Event
from
'
vs/base/common/event
'
;
import
{
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
*
as
modes
from
'
vs/editor/common/modes
'
;
import
{
IModeService
,
IModeLookupResult
}
from
'
vs/editor/common/services/modeService
'
;
export
class
MockModeService
implements
IModeService
{
_serviceBrand
:
any
;
onDidAddModes
:
Event
<
string
[]
>
=
undefined
;
onDidCreateMode
:
Event
<
modes
.
IMode
>
=
undefined
;
// --- reading
isRegisteredMode
(
mimetypeOrModeId
:
string
):
boolean
{
throw
new
Error
(
'
Not implemented
'
);
}
isCompatMode
(
modeId
:
string
):
boolean
{
throw
new
Error
(
'
Not implemented
'
);
}
getRegisteredModes
():
string
[]
{
throw
new
Error
(
'
Not implemented
'
);
}
getRegisteredLanguageNames
():
string
[]
{
throw
new
Error
(
'
Not implemented
'
);
}
getExtensions
(
alias
:
string
):
string
[]
{
throw
new
Error
(
'
Not implemented
'
);
}
getFilenames
(
alias
:
string
):
string
[]
{
throw
new
Error
(
'
Not implemented
'
);
}
getMimeForMode
(
modeId
:
string
):
string
{
throw
new
Error
(
'
Not implemented
'
);
}
getLanguageName
(
modeId
:
string
):
string
{
throw
new
Error
(
'
Not implemented
'
);
}
getModeIdForLanguageName
(
alias
:
string
):
string
{
throw
new
Error
(
'
Not implemented
'
);
}
getModeIdByFilenameOrFirstLine
(
filename
:
string
,
firstLine
?:
string
):
string
{
throw
new
Error
(
'
Not implemented
'
);
}
getModeId
(
commaSeparatedMimetypesOrCommaSeparatedIds
:
string
):
string
{
throw
new
Error
(
'
Not implemented
'
);
}
getConfigurationFiles
(
modeId
:
string
):
string
[]
{
throw
new
Error
(
'
Not implemented
'
);
}
// --- instantiation
lookup
(
commaSeparatedMimetypesOrCommaSeparatedIds
:
string
):
IModeLookupResult
[]
{
throw
new
Error
(
'
Not implemented
'
);
}
getMode
(
commaSeparatedMimetypesOrCommaSeparatedIds
:
string
):
modes
.
IMode
{
throw
new
Error
(
'
Not implemented
'
);
}
getOrCreateMode
(
commaSeparatedMimetypesOrCommaSeparatedIds
:
string
):
TPromise
<
modes
.
IMode
>
{
throw
new
Error
(
'
Not implemented
'
);
}
getOrCreateModeByLanguageName
(
languageName
:
string
):
TPromise
<
modes
.
IMode
>
{
throw
new
Error
(
'
Not implemented
'
);
}
getOrCreateModeByFilenameOrFirstLine
(
filename
:
string
,
firstLine
?:
string
):
TPromise
<
modes
.
IMode
>
{
throw
new
Error
(
'
Not implemented
'
);
}
registerTokenizationSupport
(
modeId
:
string
,
callback
:
(
mode
:
modes
.
IMode
)
=>
modes
.
ITokenizationSupport
):
IDisposable
{
throw
new
Error
(
'
Not implemented
'
);
}
registerTokenizationSupport2
(
modeId
:
string
,
support
:
modes
.
TokensProvider
):
IDisposable
{
throw
new
Error
(
'
Not implemented
'
);
}
}
src/vs/editor/test/common/services/languagesRegistry.test.ts
浏览文件 @
4315160d
...
...
@@ -12,13 +12,11 @@ suite('LanguagesRegistry', () => {
test
(
'
output mode does not have a name
'
,
()
=>
{
let
registry
=
new
LanguagesRegistry
(
false
);
registry
.
_register
CompatMod
es
([{
registry
.
_register
Languag
es
([{
id
:
'
outputModeId
'
,
extensions
:
[],
aliases
:
[
null
],
mimetypes
:
[
'
outputModeMimeType
'
],
moduleId
:
'
outputModeModuleId
'
,
ctorName
:
'
outputModeCtorName
'
}]);
assert
.
deepEqual
(
registry
.
getRegisteredLanguageNames
(),
[]);
...
...
@@ -27,13 +25,11 @@ suite('LanguagesRegistry', () => {
test
(
'
mode with alias does have a name
'
,
()
=>
{
let
registry
=
new
LanguagesRegistry
(
false
);
registry
.
_register
CompatMod
es
([{
registry
.
_register
Languag
es
([{
id
:
'
modeId
'
,
extensions
:
[],
aliases
:
[
'
ModeName
'
],
mimetypes
:
[
'
bla
'
],
moduleId
:
'
bla
'
,
ctorName
:
'
bla
'
}]);
assert
.
deepEqual
(
registry
.
getRegisteredLanguageNames
(),
[
'
ModeName
'
]);
...
...
@@ -43,13 +39,11 @@ suite('LanguagesRegistry', () => {
test
(
'
mode without alias gets a name
'
,
()
=>
{
let
registry
=
new
LanguagesRegistry
(
false
);
registry
.
_register
CompatMod
es
([{
registry
.
_register
Languag
es
([{
id
:
'
modeId
'
,
extensions
:
[],
aliases
:
[],
mimetypes
:
[
'
bla
'
],
moduleId
:
'
bla
'
,
ctorName
:
'
bla
'
}]);
assert
.
deepEqual
(
registry
.
getRegisteredLanguageNames
(),
[
'
modeId
'
]);
...
...
@@ -59,22 +53,18 @@ suite('LanguagesRegistry', () => {
test
(
'
bug #4360: f# not shown in status bar
'
,
()
=>
{
let
registry
=
new
LanguagesRegistry
(
false
);
registry
.
_register
CompatMod
es
([{
registry
.
_register
Languag
es
([{
id
:
'
modeId
'
,
extensions
:
[
'
.ext1
'
],
aliases
:
[
'
ModeName
'
],
mimetypes
:
[
'
bla
'
],
moduleId
:
'
bla
'
,
ctorName
:
'
bla
'
}]);
registry
.
_register
CompatMod
es
([{
registry
.
_register
Languag
es
([{
id
:
'
modeId
'
,
extensions
:
[
'
.ext2
'
],
aliases
:
[],
mimetypes
:
[
'
bla
'
],
moduleId
:
'
bla
'
,
ctorName
:
'
bla
'
}]);
assert
.
deepEqual
(
registry
.
getRegisteredLanguageNames
(),
[
'
ModeName
'
]);
...
...
@@ -84,22 +74,18 @@ suite('LanguagesRegistry', () => {
test
(
'
issue #5278: Extension cannot override language name anymore
'
,
()
=>
{
let
registry
=
new
LanguagesRegistry
(
false
);
registry
.
_register
CompatMod
es
([{
registry
.
_register
Languag
es
([{
id
:
'
modeId
'
,
extensions
:
[
'
.ext1
'
],
aliases
:
[
'
ModeName
'
],
mimetypes
:
[
'
bla
'
],
moduleId
:
'
bla
'
,
ctorName
:
'
bla
'
}]);
registry
.
_register
CompatMod
es
([{
registry
.
_register
Languag
es
([{
id
:
'
modeId
'
,
extensions
:
[
'
.ext2
'
],
aliases
:
[
'
BetterModeName
'
],
mimetypes
:
[
'
bla
'
],
moduleId
:
'
bla
'
,
ctorName
:
'
bla
'
}]);
assert
.
deepEqual
(
registry
.
getRegisteredLanguageNames
(),
[
'
BetterModeName
'
]);
...
...
src/vs/platform/instantiation/common/descriptors.ts
浏览文件 @
4315160d
...
...
@@ -206,90 +206,6 @@ export class AsyncDescriptor<T> extends AbstractDescriptor<T> implements AsyncDe
}
}
export
interface
CreateAsyncFunc0
{
<
T
>
(
moduleName
:
string
,
ctorName
:
string
):
AsyncDescriptor0
<
T
>
;
<
A1
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
):
AsyncDescriptor0
<
T
>
;
<
A1
,
A2
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
):
AsyncDescriptor0
<
T
>
;
<
A1
,
A2
,
A3
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
):
AsyncDescriptor0
<
T
>
;
<
A1
,
A2
,
A3
,
A4
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
,
a4
:
A4
):
AsyncDescriptor0
<
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
,
a4
:
A4
,
a5
:
A5
):
AsyncDescriptor0
<
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
,
a4
:
A4
,
a5
:
A5
,
a6
:
A6
):
AsyncDescriptor0
<
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
,
a4
:
A4
,
a5
:
A5
,
a6
:
A6
,
a7
:
A7
):
AsyncDescriptor0
<
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
,
a4
:
A4
,
a5
:
A5
,
a6
:
A6
,
a7
:
A7
,
a8
:
A8
):
AsyncDescriptor0
<
T
>
;
}
export
interface
CreateAsyncFunc1
{
<
A1
,
T
>
(
moduleName
:
string
,
ctorName
:
string
):
AsyncDescriptor1
<
A1
,
T
>
;
<
A1
,
A2
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
):
AsyncDescriptor1
<
A2
,
T
>
;
<
A1
,
A2
,
A3
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
):
AsyncDescriptor1
<
A3
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
):
AsyncDescriptor1
<
A4
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
,
a4
:
A4
):
AsyncDescriptor1
<
A5
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
,
a4
:
A4
,
a5
:
A5
):
AsyncDescriptor1
<
A6
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
,
a4
:
A4
,
a5
:
A5
,
a6
:
A6
):
AsyncDescriptor1
<
A7
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
,
a4
:
A4
,
a5
:
A5
,
a6
:
A6
,
a7
:
A7
):
AsyncDescriptor1
<
A8
,
T
>
;
}
export
interface
CreateAsyncFunc2
{
<
A1
,
A2
,
T
>
(
moduleName
:
string
,
ctorName
:
string
):
AsyncDescriptor2
<
A1
,
A2
,
T
>
;
<
A1
,
A2
,
A3
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
):
AsyncDescriptor2
<
A2
,
A3
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
):
AsyncDescriptor2
<
A3
,
A4
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
):
AsyncDescriptor2
<
A4
,
A5
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
,
a4
:
A4
):
AsyncDescriptor2
<
A5
,
A6
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
,
a4
:
A4
,
a5
:
A5
):
AsyncDescriptor2
<
A6
,
A7
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
,
a4
:
A4
,
a5
:
A5
,
a6
:
A6
):
AsyncDescriptor2
<
A7
,
A8
,
T
>
;
}
export
interface
CreateAsyncFunc3
{
<
A1
,
A2
,
A3
,
T
>
(
moduleName
:
string
,
ctorName
:
string
):
AsyncDescriptor3
<
A1
,
A2
,
A3
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
):
AsyncDescriptor3
<
A2
,
A3
,
A4
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
):
AsyncDescriptor3
<
A3
,
A4
,
A5
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
):
AsyncDescriptor3
<
A4
,
A5
,
A6
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
,
a4
:
A4
):
AsyncDescriptor3
<
A5
,
A6
,
A7
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
,
a4
:
A4
,
a5
:
A5
):
AsyncDescriptor3
<
A6
,
A7
,
A8
,
T
>
;
}
export
interface
CreateAsyncFunc4
{
<
A1
,
A2
,
A3
,
A4
,
T
>
(
moduleName
:
string
,
ctorName
:
string
):
AsyncDescriptor4
<
A1
,
A2
,
A3
,
A4
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
):
AsyncDescriptor4
<
A2
,
A3
,
A4
,
A5
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
):
AsyncDescriptor4
<
A3
,
A4
,
A5
,
A6
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
):
AsyncDescriptor4
<
A4
,
A5
,
A6
,
A7
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
,
a4
:
A4
):
AsyncDescriptor4
<
A5
,
A6
,
A7
,
A8
,
T
>
;
}
export
interface
CreateAsyncFunc5
{
<
A1
,
A2
,
A3
,
A4
,
A5
,
T
>
(
moduleName
:
string
,
ctorName
:
string
):
AsyncDescriptor5
<
A1
,
A2
,
A3
,
A4
,
A5
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
):
AsyncDescriptor5
<
A2
,
A3
,
A4
,
A5
,
A6
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
):
AsyncDescriptor5
<
A3
,
A4
,
A5
,
A6
,
A7
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
,
a3
:
A3
):
AsyncDescriptor5
<
A4
,
A5
,
A6
,
A7
,
A8
,
T
>
;
}
export
interface
CreateAsyncFunc6
{
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
T
>
(
moduleName
:
string
,
ctorName
:
string
):
AsyncDescriptor6
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
):
AsyncDescriptor6
<
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
,
a2
:
A2
):
AsyncDescriptor6
<
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
T
>
;
}
export
interface
CreateAsyncFunc7
{
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
T
>
(
moduleName
:
string
,
ctorName
:
string
):
AsyncDescriptor7
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
T
>
;
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
T
>
(
moduleName
:
string
,
ctorName
:
string
,
a1
:
A1
):
AsyncDescriptor7
<
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
T
>
;
}
export
interface
CreateAsyncFunc8
{
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
T
>
(
moduleName
:
string
,
ctorName
:
string
):
AsyncDescriptor8
<
A1
,
A2
,
A3
,
A4
,
A5
,
A6
,
A7
,
A8
,
T
>
;
}
let
_createAsyncDescriptor
=
<
T
>
(
moduleName
:
string
,
ctorName
:
string
,
...
staticArguments
:
any
[]):
any
=>
{
return
new
AsyncDescriptor
<
T
>
(
moduleName
,
ctorName
,
...
staticArguments
);
};
export
const
createAsyncDescriptor0
:
CreateAsyncFunc0
=
_createAsyncDescriptor
;
export
const
createAsyncDescriptor1
:
CreateAsyncFunc1
=
_createAsyncDescriptor
;
export
const
createAsyncDescriptor2
:
CreateAsyncFunc2
=
_createAsyncDescriptor
;
export
const
createAsyncDescriptor3
:
CreateAsyncFunc3
=
_createAsyncDescriptor
;
export
const
createAsyncDescriptor4
:
CreateAsyncFunc4
=
_createAsyncDescriptor
;
export
const
createAsyncDescriptor5
:
CreateAsyncFunc5
=
_createAsyncDescriptor
;
export
const
createAsyncDescriptor6
:
CreateAsyncFunc6
=
_createAsyncDescriptor
;
export
const
createAsyncDescriptor7
:
CreateAsyncFunc7
=
_createAsyncDescriptor
;
export
interface
AsyncDescriptor0
<
T
>
{
moduleName
:
string
;
bind
():
AsyncDescriptor0
<
T
>
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录