parent
edfbc25768
commit
8e84f8a1c4
@ -48,12 +48,21 @@ export class ReflectionCapabilities {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_zipTypesAndAnnotaions(paramTypes, paramAnnotations): List<List<any>> {
|
_zipTypesAndAnnotaions(paramTypes, paramAnnotations): List<List<any>> {
|
||||||
var result = ListWrapper.createFixedSize(paramTypes.length);
|
var result;
|
||||||
|
|
||||||
|
if (typeof paramTypes === 'undefined') {
|
||||||
|
result = ListWrapper.createFixedSize(paramAnnotations.length);
|
||||||
|
} else {
|
||||||
|
result = ListWrapper.createFixedSize(paramTypes.length);
|
||||||
|
}
|
||||||
|
|
||||||
for (var i = 0; i < result.length; i++) {
|
for (var i = 0; i < result.length; i++) {
|
||||||
// TS outputs Object for parameters without types, while Traceur omits
|
// TS outputs Object for parameters without types, while Traceur omits
|
||||||
// the annotations. For now we preserve the Traceur behavior to aid
|
// the annotations. For now we preserve the Traceur behavior to aid
|
||||||
// migration, but this can be revisited.
|
// migration, but this can be revisited.
|
||||||
if (paramTypes[i] != Object) {
|
if (typeof paramTypes === 'undefined') {
|
||||||
|
result[i] = [];
|
||||||
|
} else if (paramTypes[i] != Object) {
|
||||||
result[i] = [paramTypes[i]];
|
result[i] = [paramTypes[i]];
|
||||||
} else {
|
} else {
|
||||||
result[i] = [];
|
result[i] = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user