Update LKG

This commit is contained in:
Mohamed Hegazy
2018-05-18 12:41:13 -07:00
parent ac0e86c69f
commit f7c6b46a29
14 changed files with 5215 additions and 3401 deletions
+4 -4
View File
@@ -332,7 +332,7 @@
"Duplicate_number_index_signature_2375": "Doppelte Zahlenindexsignatur.",
"Duplicate_string_index_signature_2374": "Doppelte Zeichenfolgen-Indexsignatur.",
"Dynamic_import_cannot_have_type_arguments_1326": "Der dynamische Import kann nicht über Typargumente verfügen.",
"Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.",
"Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "Der dynamische Import wird nur unterstützt, wenn das Flag \"--module\" auf \"commonjs\" oder \"esNext\" festgelegt ist.",
"Dynamic_import_must_have_one_specifier_as_an_argument_1324": "Der dynamische Import benötigt einen Spezifizierer als Argument.",
"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "Der Spezifizierer des dynamischen Imports muss den Typ \"string\" aufweisen, hier ist er jedoch vom Typ \"{0}\".",
"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015": "Das Element weist implizit einen Typ \"any\" auf, weil der Indexausdruck nicht vom Typ \"number\" ist.",
@@ -567,7 +567,7 @@
"Module_name_0_was_successfully_resolved_to_1_6089": "======== Der Modulname \"{0}\" wurde erfolgreich in \"{1}\" aufgelöst. ========",
"Module_resolution_kind_is_not_specified_using_0_6088": "Die Art der Modulauflösung wird nicht angegeben. \"{0}\" wird verwendet.",
"Module_resolution_using_rootDirs_has_failed_6111": "Fehler bei der Modulauflösung mithilfe von \"rootDirs\".",
"Move_to_a_new_file_95049": "Move to a new file",
"Move_to_a_new_file_95049": "In neue Datei verschieben",
"Multiple_consecutive_numeric_separators_are_not_permitted_6189": "Mehrere aufeinander folgende numerische Trennzeichen sind nicht zulässig.",
"Multiple_constructor_implementations_are_not_allowed_2392": "Mehrere Konstruktorimplementierungen sind unzulässig.",
"NEWLINE_6061": "NEUE ZEILE",
@@ -707,11 +707,11 @@
"Raise_error_on_this_expressions_with_an_implied_any_type_6115": "Fehler für \"this\"-Ausdrücke mit einem impliziten any-Typ auslösen.",
"Redirect_output_structure_to_the_directory_6006": "Die Ausgabestruktur in das Verzeichnis umleiten.",
"Referenced_project_0_must_have_setting_composite_Colon_true_6306": "Das referenzierte Projekt \"{0}\" muss für die Einstellung \"composite\" den Wert TRUE aufweisen.",
"Remove_all_unreachable_code_95051": "Remove all unreachable code",
"Remove_all_unreachable_code_95051": "Gesamten nicht erreichbaren Code entfernen",
"Remove_declaration_for_Colon_0_90004": "Deklaration entfernen für: {0}",
"Remove_destructuring_90009": "Destrukturierung entfernen",
"Remove_import_from_0_90005": "Import aus \"{0}\" entfernen",
"Remove_unreachable_code_95050": "Remove unreachable code",
"Remove_unreachable_code_95050": "Nicht erreichbaren Code entfernen",
"Replace_import_with_0_95015": "Ersetzen Sie den Import durch \"{0}\".",
"Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Fehler melden, wenn nicht alle Codepfade in der Funktion einen Wert zurückgeben.",
"Report_errors_for_fallthrough_cases_in_switch_statement_6076": "Für FallTrough-Fälle in switch-Anweisung Fehler melden.",
@@ -651,6 +651,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_missing_typeof_95052" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add missing typeof]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
+4 -1
View File
@@ -332,7 +332,7 @@
"Duplicate_number_index_signature_2375": "Signatura de índice de número duplicada.",
"Duplicate_string_index_signature_2374": "Signatura de índice de cadena duplicada.",
"Dynamic_import_cannot_have_type_arguments_1326": "La importación dinámica no puede tener argumentos de tipo",
"Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.",
"Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "La importación dinámica solo se admite cuando la marca \"--module\" es \"commonjs\" o \"esNext\".",
"Dynamic_import_must_have_one_specifier_as_an_argument_1324": "La importación dinámica debe tener un especificador como argumento.",
"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "El especificador de la importación dinámica debe ser de tipo \"string\", pero aquí tiene el tipo \"{0}\".",
"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015": "El elemento tiene un tipo 'any' implícito porque la expresión de índice no es de tipo 'number'.",
@@ -567,6 +567,7 @@
"Module_name_0_was_successfully_resolved_to_1_6089": "======== El nombre del módulo '{0}' se resolvió correctamente como '{1}'. ========",
"Module_resolution_kind_is_not_specified_using_0_6088": "No se ha especificado el tipo de resolución del módulo, se usará '{0}'.",
"Module_resolution_using_rootDirs_has_failed_6111": "No se pudo resolver el módulo con \"rootDirs\".",
"Move_to_a_new_file_95049": "Mover a un nuevo archivo",
"Multiple_consecutive_numeric_separators_are_not_permitted_6189": "No se permiten varios separadores numéricos consecutivos.",
"Multiple_constructor_implementations_are_not_allowed_2392": "No se permiten varias implementaciones del constructor.",
"NEWLINE_6061": "NUEVA LÍNEA",
@@ -706,9 +707,11 @@
"Raise_error_on_this_expressions_with_an_implied_any_type_6115": "Generar un error en expresiones 'this' con un tipo 'any' implícito.",
"Redirect_output_structure_to_the_directory_6006": "Redirija la estructura de salida al directorio.",
"Referenced_project_0_must_have_setting_composite_Colon_true_6306": "El proyecto \"{0}\" al que se hace referencia debe tener el valor \"composite\": true.",
"Remove_all_unreachable_code_95051": "Quitar todo el código inaccesible",
"Remove_declaration_for_Colon_0_90004": "Quitar declaración de: \"{0}\"",
"Remove_destructuring_90009": "Quitar la desestructuración",
"Remove_import_from_0_90005": "Quitar importación de \"{0}\"",
"Remove_unreachable_code_95050": "Quitar el código inaccesible",
"Replace_import_with_0_95015": "Reemplazar importación por \"{0}\".",
"Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "Notificar un error cuando no todas las rutas de acceso de código en funcionamiento devuelven un valor.",
"Report_errors_for_fallthrough_cases_in_switch_statement_6076": "Notificar errores de los casos de fallthrough en la instrucción switch.",
+1 -6
View File
@@ -28,9 +28,4 @@ interface RegExpExecArray {
groups?: {
[key: string]: string
}
}
interface RegExp {
/** Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. Default is false. Read-only. */
readonly dotAll: boolean;
}
}
+4 -1
View File
@@ -332,7 +332,7 @@
"Duplicate_number_index_signature_2375": "Dizin imzasında yinelenen numara.",
"Duplicate_string_index_signature_2374": "Dizin imzasında yinelenen dize.",
"Dynamic_import_cannot_have_type_arguments_1326": "Dinamik içeri aktarma, tür bağımsız değişkenleri içeremez",
"Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.",
"Dynamic_import_is_only_supported_when_module_flag_is_commonjs_or_esNext_1323": "Dinamik içeri aktarma yalnızca '--module' bayrağı 'commonjs' veya 'esNext' olduğunda desteklenir.",
"Dynamic_import_must_have_one_specifier_as_an_argument_1324": "Dinamik içeri aktarma, bağımsız değişken olarak bir tanımlayıcı içermelidir.",
"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036": "Dinamik içeri aktarmanın tanımlayıcısı 'string' türünde olmalıdır, ancak buradaki tür: '{0}'.",
"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015": "Dizin ifadesi 'number' türünde olmadığından, öğe örtük olarak 'any' türü içeriyor.",
@@ -567,6 +567,7 @@
"Module_name_0_was_successfully_resolved_to_1_6089": "======== '{0}' modül adı '{1}' öğesine başarıyla çözümlendi. ========",
"Module_resolution_kind_is_not_specified_using_0_6088": "Modül çözümleme türü belirtilmedi, '{0}' kullanılıyor.",
"Module_resolution_using_rootDirs_has_failed_6111": "'rootDirs' kullanarak modül çözümleme başarısız oldu.",
"Move_to_a_new_file_95049": "Yeni bir dosyaya taşı",
"Multiple_consecutive_numeric_separators_are_not_permitted_6189": "Birbirini izleyen birden çok sayısal ayırıcıya izin verilmez.",
"Multiple_constructor_implementations_are_not_allowed_2392": "Birden çok oluşturucu uygulamasına izin verilmez.",
"NEWLINE_6061": "YENİ SATIR",
@@ -706,9 +707,11 @@
"Raise_error_on_this_expressions_with_an_implied_any_type_6115": "Örtük olarak 'any' türü içeren 'this' ifadelerinde hata tetikle.",
"Redirect_output_structure_to_the_directory_6006": "Çıktı yapısını dizine yeniden yönlendir.",
"Referenced_project_0_must_have_setting_composite_Colon_true_6306": "Başvurulan proje '{0}' \"composite\": true ayarına sahip olmalıdır.",
"Remove_all_unreachable_code_95051": "Tüm erişilemeyen kodları kaldır",
"Remove_declaration_for_Colon_0_90004": "'{0}' bildirimini kaldır",
"Remove_destructuring_90009": "Yıkmayı kaldır",
"Remove_import_from_0_90005": "'{0}' öğesinden içeri aktarmayı kaldır",
"Remove_unreachable_code_95050": "Erişilemeyen kodları kaldır",
"Replace_import_with_0_95015": "İçeri aktarma işlemini '{0}' ile değiştirin.",
"Report_error_when_not_all_code_paths_in_function_return_a_value_6075": "İşlevdeki tüm kod yolları bir değer döndürmediğinde hata bildir.",
"Report_errors_for_fallthrough_cases_in_switch_statement_6076": "switch deyiminde sonraki ifadelere geçiş ile ilgili hataları bildir.",
+701 -460
View File
File diff suppressed because it is too large Load Diff
+963 -628
View File
File diff suppressed because it is too large Load Diff
+39 -21
View File
@@ -349,22 +349,24 @@ declare namespace ts {
JSDocVariadicType = 284,
JSDocComment = 285,
JSDocTypeLiteral = 286,
JSDocTag = 287,
JSDocAugmentsTag = 288,
JSDocClassTag = 289,
JSDocParameterTag = 290,
JSDocReturnTag = 291,
JSDocTypeTag = 292,
JSDocTemplateTag = 293,
JSDocTypedefTag = 294,
JSDocPropertyTag = 295,
SyntaxList = 296,
NotEmittedStatement = 297,
PartiallyEmittedExpression = 298,
CommaListExpression = 299,
MergeDeclarationMarker = 300,
EndOfDeclarationMarker = 301,
Count = 302,
JSDocSignature = 287,
JSDocTag = 288,
JSDocAugmentsTag = 289,
JSDocClassTag = 290,
JSDocCallbackTag = 291,
JSDocParameterTag = 292,
JSDocReturnTag = 293,
JSDocTypeTag = 294,
JSDocTemplateTag = 295,
JSDocTypedefTag = 296,
JSDocPropertyTag = 297,
SyntaxList = 298,
NotEmittedStatement = 299,
PartiallyEmittedExpression = 300,
CommaListExpression = 301,
MergeDeclarationMarker = 302,
EndOfDeclarationMarker = 303,
Count = 304,
FirstAssignment = 58,
LastAssignment = 70,
FirstCompoundAssignment = 59,
@@ -391,9 +393,9 @@ declare namespace ts {
LastBinaryOperator = 70,
FirstNode = 145,
FirstJSDocNode = 277,
LastJSDocNode = 295,
FirstJSDocTagNode = 287,
LastJSDocTagNode = 295
LastJSDocNode = 297,
FirstJSDocTagNode = 288,
LastJSDocTagNode = 297
}
enum NodeFlags {
None = 0,
@@ -1280,7 +1282,7 @@ declare namespace ts {
block: Block;
}
type ObjectTypeDeclaration = ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode;
type DeclarationWithTypeParameters = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag;
type DeclarationWithTypeParameters = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag | JSDocTypedefTag | JSDocCallbackTag | JSDocSignature;
interface ClassLikeDeclarationBase extends NamedDeclaration, JSDocContainer {
kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression;
name?: Identifier;
@@ -1537,6 +1539,19 @@ declare namespace ts {
name?: Identifier;
typeExpression?: JSDocTypeExpression | JSDocTypeLiteral;
}
interface JSDocCallbackTag extends JSDocTag, NamedDeclaration {
parent: JSDoc;
kind: SyntaxKind.JSDocCallbackTag;
fullName?: JSDocNamespaceDeclaration | Identifier;
name?: Identifier;
typeExpression: JSDocSignature;
}
interface JSDocSignature extends JSDocType, Declaration {
kind: SyntaxKind.JSDocSignature;
typeParameters?: ReadonlyArray<JSDocTemplateTag>;
parameters: ReadonlyArray<JSDocParameterTag>;
type: JSDocReturnTag | undefined;
}
interface JSDocPropertyLikeTag extends JSDocTag, Declaration {
parent: JSDoc;
name: EntityName;
@@ -1885,6 +1900,7 @@ declare namespace ts {
WriteArrayAsGenericType = 2,
GenerateNamesForShadowedTypeParams = 4,
UseStructuralFallback = 8,
ForbidIndexedAccessSymbolReferences = 16,
WriteTypeArgumentsOfSignature = 32,
UseFullyQualifiedType = 64,
UseOnlyExternalAliasing = 128,
@@ -2283,7 +2299,7 @@ declare namespace ts {
Construct = 1
}
interface Signature {
declaration?: SignatureDeclaration;
declaration?: SignatureDeclaration | JSDocSignature;
typeParameters?: TypeParameter[];
parameters: Symbol[];
}
@@ -3362,6 +3378,8 @@ declare namespace ts {
function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag;
function isJSDocPropertyLikeTag(node: Node): node is JSDocPropertyLikeTag;
function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral;
function isJSDocCallbackTag(node: Node): node is JSDocCallbackTag;
function isJSDocSignature(node: Node): node is JSDocSignature;
}
declare namespace ts {
/**
+1074 -724
View File
File diff suppressed because it is too large Load Diff
+39 -21
View File
@@ -349,22 +349,24 @@ declare namespace ts {
JSDocVariadicType = 284,
JSDocComment = 285,
JSDocTypeLiteral = 286,
JSDocTag = 287,
JSDocAugmentsTag = 288,
JSDocClassTag = 289,
JSDocParameterTag = 290,
JSDocReturnTag = 291,
JSDocTypeTag = 292,
JSDocTemplateTag = 293,
JSDocTypedefTag = 294,
JSDocPropertyTag = 295,
SyntaxList = 296,
NotEmittedStatement = 297,
PartiallyEmittedExpression = 298,
CommaListExpression = 299,
MergeDeclarationMarker = 300,
EndOfDeclarationMarker = 301,
Count = 302,
JSDocSignature = 287,
JSDocTag = 288,
JSDocAugmentsTag = 289,
JSDocClassTag = 290,
JSDocCallbackTag = 291,
JSDocParameterTag = 292,
JSDocReturnTag = 293,
JSDocTypeTag = 294,
JSDocTemplateTag = 295,
JSDocTypedefTag = 296,
JSDocPropertyTag = 297,
SyntaxList = 298,
NotEmittedStatement = 299,
PartiallyEmittedExpression = 300,
CommaListExpression = 301,
MergeDeclarationMarker = 302,
EndOfDeclarationMarker = 303,
Count = 304,
FirstAssignment = 58,
LastAssignment = 70,
FirstCompoundAssignment = 59,
@@ -391,9 +393,9 @@ declare namespace ts {
LastBinaryOperator = 70,
FirstNode = 145,
FirstJSDocNode = 277,
LastJSDocNode = 295,
FirstJSDocTagNode = 287,
LastJSDocTagNode = 295
LastJSDocNode = 297,
FirstJSDocTagNode = 288,
LastJSDocTagNode = 297
}
enum NodeFlags {
None = 0,
@@ -1280,7 +1282,7 @@ declare namespace ts {
block: Block;
}
type ObjectTypeDeclaration = ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode;
type DeclarationWithTypeParameters = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag;
type DeclarationWithTypeParameters = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag | JSDocTypedefTag | JSDocCallbackTag | JSDocSignature;
interface ClassLikeDeclarationBase extends NamedDeclaration, JSDocContainer {
kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression;
name?: Identifier;
@@ -1537,6 +1539,19 @@ declare namespace ts {
name?: Identifier;
typeExpression?: JSDocTypeExpression | JSDocTypeLiteral;
}
interface JSDocCallbackTag extends JSDocTag, NamedDeclaration {
parent: JSDoc;
kind: SyntaxKind.JSDocCallbackTag;
fullName?: JSDocNamespaceDeclaration | Identifier;
name?: Identifier;
typeExpression: JSDocSignature;
}
interface JSDocSignature extends JSDocType, Declaration {
kind: SyntaxKind.JSDocSignature;
typeParameters?: ReadonlyArray<JSDocTemplateTag>;
parameters: ReadonlyArray<JSDocParameterTag>;
type: JSDocReturnTag | undefined;
}
interface JSDocPropertyLikeTag extends JSDocTag, Declaration {
parent: JSDoc;
name: EntityName;
@@ -1885,6 +1900,7 @@ declare namespace ts {
WriteArrayAsGenericType = 2,
GenerateNamesForShadowedTypeParams = 4,
UseStructuralFallback = 8,
ForbidIndexedAccessSymbolReferences = 16,
WriteTypeArgumentsOfSignature = 32,
UseFullyQualifiedType = 64,
UseOnlyExternalAliasing = 128,
@@ -2283,7 +2299,7 @@ declare namespace ts {
Construct = 1
}
interface Signature {
declaration?: SignatureDeclaration;
declaration?: SignatureDeclaration | JSDocSignature;
typeParameters?: TypeParameter[];
parameters: Symbol[];
}
@@ -3362,6 +3378,8 @@ declare namespace ts {
function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag;
function isJSDocPropertyLikeTag(node: Node): node is JSDocPropertyLikeTag;
function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral;
function isJSDocCallbackTag(node: Node): node is JSDocCallbackTag;
function isJSDocSignature(node: Node): node is JSDocSignature;
}
declare namespace ts {
/**
+1044 -694
View File
File diff suppressed because it is too large Load Diff
+39 -21
View File
@@ -349,22 +349,24 @@ declare namespace ts {
JSDocVariadicType = 284,
JSDocComment = 285,
JSDocTypeLiteral = 286,
JSDocTag = 287,
JSDocAugmentsTag = 288,
JSDocClassTag = 289,
JSDocParameterTag = 290,
JSDocReturnTag = 291,
JSDocTypeTag = 292,
JSDocTemplateTag = 293,
JSDocTypedefTag = 294,
JSDocPropertyTag = 295,
SyntaxList = 296,
NotEmittedStatement = 297,
PartiallyEmittedExpression = 298,
CommaListExpression = 299,
MergeDeclarationMarker = 300,
EndOfDeclarationMarker = 301,
Count = 302,
JSDocSignature = 287,
JSDocTag = 288,
JSDocAugmentsTag = 289,
JSDocClassTag = 290,
JSDocCallbackTag = 291,
JSDocParameterTag = 292,
JSDocReturnTag = 293,
JSDocTypeTag = 294,
JSDocTemplateTag = 295,
JSDocTypedefTag = 296,
JSDocPropertyTag = 297,
SyntaxList = 298,
NotEmittedStatement = 299,
PartiallyEmittedExpression = 300,
CommaListExpression = 301,
MergeDeclarationMarker = 302,
EndOfDeclarationMarker = 303,
Count = 304,
FirstAssignment = 58,
LastAssignment = 70,
FirstCompoundAssignment = 59,
@@ -391,9 +393,9 @@ declare namespace ts {
LastBinaryOperator = 70,
FirstNode = 145,
FirstJSDocNode = 277,
LastJSDocNode = 295,
FirstJSDocTagNode = 287,
LastJSDocTagNode = 295
LastJSDocNode = 297,
FirstJSDocTagNode = 288,
LastJSDocTagNode = 297
}
enum NodeFlags {
None = 0,
@@ -1280,7 +1282,7 @@ declare namespace ts {
block: Block;
}
type ObjectTypeDeclaration = ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode;
type DeclarationWithTypeParameters = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag;
type DeclarationWithTypeParameters = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag | JSDocTypedefTag | JSDocCallbackTag | JSDocSignature;
interface ClassLikeDeclarationBase extends NamedDeclaration, JSDocContainer {
kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression;
name?: Identifier;
@@ -1537,6 +1539,19 @@ declare namespace ts {
name?: Identifier;
typeExpression?: JSDocTypeExpression | JSDocTypeLiteral;
}
interface JSDocCallbackTag extends JSDocTag, NamedDeclaration {
parent: JSDoc;
kind: SyntaxKind.JSDocCallbackTag;
fullName?: JSDocNamespaceDeclaration | Identifier;
name?: Identifier;
typeExpression: JSDocSignature;
}
interface JSDocSignature extends JSDocType, Declaration {
kind: SyntaxKind.JSDocSignature;
typeParameters?: ReadonlyArray<JSDocTemplateTag>;
parameters: ReadonlyArray<JSDocParameterTag>;
type: JSDocReturnTag | undefined;
}
interface JSDocPropertyLikeTag extends JSDocTag, Declaration {
parent: JSDoc;
name: EntityName;
@@ -1885,6 +1900,7 @@ declare namespace ts {
WriteArrayAsGenericType = 2,
GenerateNamesForShadowedTypeParams = 4,
UseStructuralFallback = 8,
ForbidIndexedAccessSymbolReferences = 16,
WriteTypeArgumentsOfSignature = 32,
UseFullyQualifiedType = 64,
UseOnlyExternalAliasing = 128,
@@ -2283,7 +2299,7 @@ declare namespace ts {
Construct = 1
}
interface Signature {
declaration?: SignatureDeclaration;
declaration?: SignatureDeclaration | JSDocSignature;
typeParameters?: TypeParameter[];
parameters: Symbol[];
}
@@ -3362,6 +3378,8 @@ declare namespace ts {
function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag;
function isJSDocPropertyLikeTag(node: Node): node is JSDocPropertyLikeTag;
function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral;
function isJSDocCallbackTag(node: Node): node is JSDocCallbackTag;
function isJSDocSignature(node: Node): node is JSDocSignature;
}
declare namespace ts {
/**
+1044 -694
View File
File diff suppressed because it is too large Load Diff
+253 -126
View File
@@ -434,6 +434,15 @@ var ts;
return -1;
}
ts.findIndex = findIndex;
function findLastIndex(array, predicate, startIndex) {
for (var i = startIndex === undefined ? array.length - 1 : startIndex; i >= 0; i--) {
if (predicate(array[i], i)) {
return i;
}
}
return -1;
}
ts.findLastIndex = findLastIndex;
function findMap(array, callback) {
for (var i = 0; i < array.length; i++) {
var result = callback(array[i], i);
@@ -764,6 +773,23 @@ var ts;
return false;
}
ts.some = some;
function getRangesWhere(arr, pred, cb) {
var start;
for (var i = 0; i < arr.length; i++) {
if (pred(arr[i])) {
start = start === undefined ? i : start;
}
else {
if (start !== undefined) {
cb(start, i);
start = undefined;
}
}
}
if (start !== undefined)
cb(start, arr.length);
}
ts.getRangesWhere = getRangesWhere;
function concatenate(array1, array2) {
if (!some(array2))
return array1;
@@ -4680,6 +4706,7 @@ var ts;
Move_to_a_new_file: diag(95049, ts.DiagnosticCategory.Message, "Move_to_a_new_file_95049", "Move to a new file"),
Remove_unreachable_code: diag(95050, ts.DiagnosticCategory.Message, "Remove_unreachable_code_95050", "Remove unreachable code"),
Remove_all_unreachable_code: diag(95051, ts.DiagnosticCategory.Message, "Remove_all_unreachable_code_95051", "Remove all unreachable code"),
Add_missing_typeof: diag(95052, ts.DiagnosticCategory.Message, "Add_missing_typeof_95052", "Add missing typeof"),
};
})(ts || (ts = {}));
var ts;
@@ -4913,7 +4940,7 @@ var ts;
if (includeJsDoc && ts.hasJSDocNodes(node)) {
return getTokenPosOfNode(node.jsDoc[0]);
}
if (node.kind === 296 && node._children.length > 0) {
if (node.kind === 298 && node._children.length > 0) {
return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
}
return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos);
@@ -5093,7 +5120,7 @@ var ts;
case 204:
case 235:
case 236:
case 293:
case 295:
case 233:
case 153:
case 154:
@@ -5101,6 +5128,9 @@ var ts;
case 156:
case 191:
case 192:
case 291:
case 296:
case 287:
return true;
default:
ts.assertTypeIsNever(node);
@@ -5140,13 +5170,7 @@ var ts;
}
ts.isAnyImportOrReExport = isAnyImportOrReExport;
function getEnclosingBlockScopeContainer(node) {
var current = node.parent;
while (current) {
if (isBlockScope(current, current.parent)) {
return current;
}
current = current.parent;
}
return ts.findAncestor(node.parent, function (current) { return isBlockScope(current, current.parent); });
}
ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer;
function declarationNameToString(name) {
@@ -6209,6 +6233,14 @@ var ts;
node.parameters[0].name.escapedText === "new";
}
ts.isJSDocConstructSignature = isJSDocConstructSignature;
function isJSDocTypeAlias(node) {
return node.kind === 296 || node.kind === 291;
}
ts.isJSDocTypeAlias = isJSDocTypeAlias;
function isTypeAlias(node) {
return isJSDocTypeAlias(node) || ts.isTypeAliasDeclaration(node);
}
ts.isTypeAlias = isTypeAlias;
function getSourceOfAssignment(node) {
return ts.isExpressionStatement(node) &&
node.expression && ts.isBinaryExpression(node.expression) &&
@@ -6230,6 +6262,8 @@ var ts;
return v && v.initializer;
case 151:
return node.initializer;
case 269:
return node.initializer;
}
}
function getSingleVariableOfVariableStatement(node) {
@@ -6254,8 +6288,7 @@ var ts;
if (parent.kind === 269 || parent.kind === 151 || getNestedModuleDeclaration(parent)) {
getJSDocCommentsAndTagsWorker(parent);
}
if (parent.parent &&
(getSingleVariableOfVariableStatement(parent.parent) === node)) {
if (parent.parent && (getSingleVariableOfVariableStatement(parent.parent) === node)) {
getJSDocCommentsAndTagsWorker(parent.parent);
}
if (parent.parent && parent.parent.parent &&
@@ -6298,7 +6331,10 @@ var ts;
}
ts.getParameterSymbolFromJSDoc = getParameterSymbolFromJSDoc;
function getHostSignatureFromJSDoc(node) {
var host = getJSDocHost(node);
return getHostSignatureFromJSDocHost(getJSDocHost(node));
}
ts.getHostSignatureFromJSDoc = getHostSignatureFromJSDoc;
function getHostSignatureFromJSDocHost(host) {
var decl = getSourceOfDefaultedAssignment(host) ||
getSourceOfAssignment(host) ||
getSingleInitializerOfVariableStatementOrPropertyDeclaration(host) ||
@@ -6307,18 +6343,12 @@ var ts;
host;
return decl && ts.isFunctionLike(decl) ? decl : undefined;
}
ts.getHostSignatureFromJSDoc = getHostSignatureFromJSDoc;
ts.getHostSignatureFromJSDocHost = getHostSignatureFromJSDocHost;
function getJSDocHost(node) {
while (node.parent.kind === 286) {
if (node.parent.parent.kind === 294) {
node = node.parent.parent;
}
else {
node = node.parent.parent.parent;
}
var comment = ts.findAncestor(node.parent, function (node) { return !(ts.isJSDocNode(node) || node.flags & 2097152) ? "quit" : node.kind === 285; });
if (comment) {
return comment.parent;
}
ts.Debug.assert(node.parent.kind === 285);
return node.parent.parent;
}
ts.getJSDocHost = getJSDocHost;
function getTypeParameterFromJsDoc(node) {
@@ -6333,7 +6363,8 @@ var ts;
}
ts.hasRestParameter = hasRestParameter;
function isRestParameter(node) {
return node.dotDotDotToken !== undefined || node.type && node.type.kind === 284;
var type = ts.isJSDocParameterTag(node) ? (node.typeExpression && node.typeExpression.type) : node.type;
return node.dotDotDotToken !== undefined || type && type.kind === 284;
}
ts.isRestParameter = isRestParameter;
function getAssignmentTargetKind(node) {
@@ -6802,7 +6833,7 @@ var ts;
ts.getOperator = getOperator;
function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
switch (nodeKind) {
case 299:
case 301:
return 0;
case 203:
return 1;
@@ -7113,8 +7144,8 @@ var ts;
};
}
ts.createTextWriter = createTextWriter;
function getResolvedExternalModuleName(host, file) {
return file.moduleName || getExternalModuleNameFromPath(host, file.fileName);
function getResolvedExternalModuleName(host, file, referenceFile) {
return file.moduleName || getExternalModuleNameFromPath(host, file.fileName, referenceFile && referenceFile.fileName);
}
ts.getResolvedExternalModuleName = getResolvedExternalModuleName;
function getExternalModuleNameFromDeclaration(host, resolver, declaration) {
@@ -7125,12 +7156,13 @@ var ts;
return getResolvedExternalModuleName(host, file);
}
ts.getExternalModuleNameFromDeclaration = getExternalModuleNameFromDeclaration;
function getExternalModuleNameFromPath(host, fileName) {
function getExternalModuleNameFromPath(host, fileName, referencePath) {
var getCanonicalFileName = function (f) { return host.getCanonicalFileName(f); };
var dir = ts.toPath(host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName);
var dir = ts.toPath(referencePath ? ts.getDirectoryPath(referencePath) : host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName);
var filePath = ts.getNormalizedAbsolutePath(fileName, host.getCurrentDirectory());
var relativePath = ts.getRelativePathToDirectoryOrUrl(dir, filePath, dir, getCanonicalFileName, false);
return ts.removeFileExtension(relativePath);
var extensionless = ts.removeFileExtension(relativePath);
return referencePath ? ts.ensurePathIsNonModuleName(extensionless) : extensionless;
}
ts.getExternalModuleNameFromPath = getExternalModuleNameFromPath;
function getOwnEmitOutputFilePath(sourceFile, host, extension) {
@@ -7212,7 +7244,7 @@ var ts;
}
ts.getSetAccessorTypeAnnotationNode = getSetAccessorTypeAnnotationNode;
function getThisParameter(signature) {
if (signature.parameters.length) {
if (signature.parameters.length && !ts.isJSDocSignature(signature)) {
var thisParameter = signature.parameters[0];
if (parameterIsThisKeyword(thisParameter)) {
return thisParameter;
@@ -7289,18 +7321,32 @@ var ts;
}
ts.getTypeAnnotationNode = getTypeAnnotationNode;
function getEffectiveReturnTypeNode(node) {
if (ts.isJSDocSignature(node)) {
return node.type && node.type.typeExpression && node.type.typeExpression.type;
}
return node.type || (isInJavaScriptFile(node) ? ts.getJSDocReturnType(node) : undefined);
}
ts.getEffectiveReturnTypeNode = getEffectiveReturnTypeNode;
function getEffectiveTypeParameterDeclarations(node) {
return ts.isJSDocTypedefTag(node)
? getJSDocTypeParameterDeclarations(node)
: node.typeParameters || (isInJavaScriptFile(node) ? getJSDocTypeParameterDeclarations(node) : undefined);
if (ts.isJSDocSignature(node)) {
return ts.emptyArray;
}
if (isJSDocTypeAlias(node)) {
ts.Debug.assert(node.parent.kind === 285);
var templateTags = ts.flatMap(ts.filter(node.parent.tags, ts.isJSDocTemplateTag), function (tag) { return tag.typeParameters; });
var templateTagNodes = templateTags;
templateTagNodes.pos = templateTagNodes.length > 0 ? ts.first(templateTagNodes).pos : node.pos;
templateTagNodes.end = templateTagNodes.length > 0 ? ts.last(templateTagNodes).end : node.end;
templateTagNodes.hasTrailingComma = false;
return templateTagNodes;
}
return node.typeParameters || (isInJavaScriptFile(node) ? getJSDocTypeParameterDeclarations(node) : ts.emptyArray);
}
ts.getEffectiveTypeParameterDeclarations = getEffectiveTypeParameterDeclarations;
function getJSDocTypeParameterDeclarations(node) {
var templateTag = ts.getJSDocTemplateTag(node);
return templateTag && templateTag.typeParameters;
var tags = ts.filter(ts.getJSDocTags(node), ts.isJSDocTemplateTag);
var tag = ts.find(tags, function (tag) { return !(tag.parent.kind === 285 && ts.find(tag.parent.tags, isJSDocTypeAlias)); });
return (tag && tag.typeParameters) || ts.emptyArray;
}
ts.getJSDocTypeParameterDeclarations = getJSDocTypeParameterDeclarations;
function getEffectiveSetAccessorTypeAnnotationNode(node) {
@@ -8419,8 +8465,8 @@ var ts;
break;
case 71:
return declaration;
case 295:
case 290: {
case 297:
case 292: {
var name = declaration.name;
if (name.kind === 145) {
return name.right;
@@ -8439,7 +8485,9 @@ var ts;
return undefined;
}
}
case 294:
case 291:
return declaration.name;
case 296:
return getNameOfJSDocTypedef(declaration);
case 248: {
var expression = declaration.expression;
@@ -8768,7 +8816,7 @@ var ts;
}
ts.isParenthesizedExpression = isParenthesizedExpression;
function skipPartiallyEmittedExpressions(node) {
while (node.kind === 298) {
while (node.kind === 300) {
node = node.expression;
}
return node;
@@ -9151,49 +9199,57 @@ var ts;
}
ts.isJSDoc = isJSDoc;
function isJSDocAugmentsTag(node) {
return node.kind === 288;
return node.kind === 289;
}
ts.isJSDocAugmentsTag = isJSDocAugmentsTag;
function isJSDocClassTag(node) {
return node.kind === 289;
return node.kind === 290;
}
ts.isJSDocClassTag = isJSDocClassTag;
function isJSDocParameterTag(node) {
return node.kind === 290;
return node.kind === 292;
}
ts.isJSDocParameterTag = isJSDocParameterTag;
function isJSDocReturnTag(node) {
return node.kind === 291;
return node.kind === 293;
}
ts.isJSDocReturnTag = isJSDocReturnTag;
function isJSDocTypeTag(node) {
return node.kind === 292;
return node.kind === 294;
}
ts.isJSDocTypeTag = isJSDocTypeTag;
function isJSDocTemplateTag(node) {
return node.kind === 293;
return node.kind === 295;
}
ts.isJSDocTemplateTag = isJSDocTemplateTag;
function isJSDocTypedefTag(node) {
return node.kind === 294;
return node.kind === 296;
}
ts.isJSDocTypedefTag = isJSDocTypedefTag;
function isJSDocPropertyTag(node) {
return node.kind === 295;
return node.kind === 297;
}
ts.isJSDocPropertyTag = isJSDocPropertyTag;
function isJSDocPropertyLikeTag(node) {
return node.kind === 295 || node.kind === 290;
return node.kind === 297 || node.kind === 292;
}
ts.isJSDocPropertyLikeTag = isJSDocPropertyLikeTag;
function isJSDocTypeLiteral(node) {
return node.kind === 286;
}
ts.isJSDocTypeLiteral = isJSDocTypeLiteral;
function isJSDocCallbackTag(node) {
return node.kind === 291;
}
ts.isJSDocCallbackTag = isJSDocCallbackTag;
function isJSDocSignature(node) {
return node.kind === 287;
}
ts.isJSDocSignature = isJSDocSignature;
})(ts || (ts = {}));
(function (ts) {
function isSyntaxList(n) {
return n.kind === 296;
return n.kind === 298;
}
ts.isSyntaxList = isSyntaxList;
function isNode(node) {
@@ -9315,6 +9371,7 @@ var ts;
switch (kind) {
case 152:
case 157:
case 287:
case 158:
case 159:
case 162:
@@ -9590,8 +9647,8 @@ var ts;
case 203:
case 207:
case 205:
case 299:
case 298:
case 301:
case 300:
return true;
default:
return isUnaryExpressionKind(kind);
@@ -9604,11 +9661,11 @@ var ts;
}
ts.isAssertionExpression = isAssertionExpression;
function isPartiallyEmittedExpression(node) {
return node.kind === 298;
return node.kind === 300;
}
ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression;
function isNotEmittedStatement(node) {
return node.kind === 297;
return node.kind === 299;
}
ts.isNotEmittedStatement = isNotEmittedStatement;
function isNotEmittedOrPartiallyEmittedNode(node) {
@@ -9708,8 +9765,9 @@ var ts;
|| kind === 236
|| kind === 147
|| kind === 231
|| kind === 294
|| kind === 295;
|| kind === 296
|| kind === 291
|| kind === 297;
}
function isDeclarationStatementKind(kind) {
return kind === 233
@@ -9744,13 +9802,13 @@ var ts;
|| kind === 213
|| kind === 218
|| kind === 225
|| kind === 297
|| kind === 301
|| kind === 300;
|| kind === 299
|| kind === 303
|| kind === 302;
}
function isDeclaration(node) {
if (node.kind === 147) {
return node.parent.kind !== 293 || ts.isInJavaScriptFile(node);
return node.parent.kind !== 295 || ts.isInJavaScriptFile(node);
}
return isDeclarationKind(node.kind);
}
@@ -9828,15 +9886,15 @@ var ts;
}
ts.isCaseOrDefaultClause = isCaseOrDefaultClause;
function isJSDocNode(node) {
return node.kind >= 277 && node.kind <= 295;
return node.kind >= 277 && node.kind <= 297;
}
ts.isJSDocNode = isJSDocNode;
function isJSDocCommentContainingNode(node) {
return node.kind === 285 || isJSDocTag(node) || ts.isJSDocTypeLiteral(node);
return node.kind === 285 || isJSDocTag(node) || ts.isJSDocTypeLiteral(node) || ts.isJSDocSignature(node);
}
ts.isJSDocCommentContainingNode = isJSDocCommentContainingNode;
function isJSDocTag(node) {
return node.kind >= 287 && node.kind <= 295;
return node.kind >= 288 && node.kind <= 297;
}
ts.isJSDocTag = isJSDocTag;
function isSetAccessor(node) {
@@ -11516,11 +11574,10 @@ var ts;
}
}
function scanJSDocToken() {
startPos = tokenPos = pos;
if (pos >= end) {
return token = 1;
}
startPos = pos;
tokenPos = pos;
var ch = text.charCodeAt(pos);
pos++;
switch (ch) {
@@ -12037,7 +12094,7 @@ var ts;
return visitNode(cbNode, node.expression);
case 252:
return visitNodes(cbNode, cbNodes, node.decorators);
case 299:
case 301:
return visitNodes(cbNode, cbNodes, node.elements);
case 254:
return visitNode(cbNode, node.openingElement) ||
@@ -12079,8 +12136,8 @@ var ts;
return visitNode(cbNode, node.type);
case 285:
return visitNodes(cbNode, cbNodes, node.tags);
case 290:
case 295:
case 292:
case 297:
if (node.isNameFirst) {
return visitNode(cbNode, node.name) ||
visitNode(cbNode, node.typeExpression);
@@ -12089,15 +12146,15 @@ var ts;
return visitNode(cbNode, node.typeExpression) ||
visitNode(cbNode, node.name);
}
case 291:
return visitNode(cbNode, node.typeExpression);
case 292:
return visitNode(cbNode, node.typeExpression);
case 288:
return visitNode(cbNode, node.class);
case 293:
return visitNodes(cbNode, cbNodes, node.typeParameters);
return visitNode(cbNode, node.typeExpression);
case 294:
return visitNode(cbNode, node.typeExpression);
case 289:
return visitNode(cbNode, node.class);
case 295:
return visitNodes(cbNode, cbNodes, node.typeParameters);
case 296:
if (node.typeExpression &&
node.typeExpression.kind === 277) {
return visitNode(cbNode, node.typeExpression) ||
@@ -12107,6 +12164,15 @@ var ts;
return visitNode(cbNode, node.fullName) ||
visitNode(cbNode, node.typeExpression);
}
case 291:
return visitNode(cbNode, node.fullName) ||
visitNode(cbNode, node.typeExpression);
case 287:
return visitNodes(cbNode, cbNodes, node.decorators) ||
visitNodes(cbNode, cbNodes, node.modifiers) ||
visitNodes(cbNode, cbNodes, node.typeParameters) ||
visitNodes(cbNode, cbNodes, node.parameters) ||
visitNode(cbNode, node.type);
case 286:
if (node.jsDocPropertyTags) {
for (var _i = 0, _a = node.jsDocPropertyTags; _i < _a.length; _i++) {
@@ -12115,7 +12181,7 @@ var ts;
}
}
return;
case 298:
case 300:
return visitNode(cbNode, node.expression);
}
}
@@ -16227,7 +16293,7 @@ var ts;
case 57:
if (state === 0 || state === 1) {
removeTrailingNewlines(comments);
parseTag(indent);
addTag(parseTag(indent));
state = 0;
margin = undefined;
indent++;
@@ -16296,7 +16362,23 @@ var ts;
result.comment = comments.length ? comments.join("") : undefined;
return finishNode(result, end);
}
function isNextNonwhitespaceTokenEndOfFile() {
while (true) {
nextJSDocToken();
if (token() === 1) {
return true;
}
if (!(token() === 5 || token() === 4)) {
return false;
}
}
}
function skipWhitespace() {
if (token() === 5 || token() === 4) {
if (lookAhead(isNextNonwhitespaceTokenEndOfFile)) {
return;
}
}
while (token() === 5 || token() === 4) {
nextJSDocToken();
}
@@ -16325,8 +16407,7 @@ var ts;
case "arg":
case "argument":
case "param":
addTag(parseParameterOrPropertyTag(atToken, tagName, 1, indent));
return;
return parseParameterOrPropertyTag(atToken, tagName, 2, indent);
case "return":
case "returns":
tag = parseReturnTag(atToken, tagName);
@@ -16338,7 +16419,10 @@ var ts;
tag = parseTypeTag(atToken, tagName);
break;
case "typedef":
tag = parseTypedefTag(atToken, tagName);
tag = parseTypedefTag(atToken, tagName, indent);
break;
case "callback":
tag = parseCallbackTag(atToken, tagName, indent);
break;
default:
tag = parseUnknownTag(atToken, tagName);
@@ -16351,8 +16435,10 @@ var ts;
if (!tag) {
return;
}
tag.comment = parseTagComments(indent + tag.end - tag.pos);
addTag(tag);
if (!tag.comment) {
tag.comment = parseTagComments(indent + tag.end - tag.pos);
}
return tag;
}
function parseTagComments(indent) {
var comments = [];
@@ -16409,12 +16495,15 @@ var ts;
return comments.length === 0 ? undefined : comments.join("");
}
function parseUnknownTag(atToken, tagName) {
var result = createNode(287, atToken.pos);
var result = createNode(288, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
return finishNode(result);
}
function addTag(tag) {
if (!tag) {
return;
}
if (!tags) {
tags = [tag];
tagsPos = tag.pos;
@@ -16463,8 +16552,8 @@ var ts;
typeExpression = tryParseTypeExpression();
}
var result = target === 1 ?
createNode(290, atToken.pos) :
createNode(295, atToken.pos);
createNode(297, atToken.pos) :
createNode(292, atToken.pos);
var comment;
if (indent !== undefined)
comment = parseTagComments(indent + scanner.getStartPos() - atToken.pos);
@@ -16490,7 +16579,7 @@ var ts;
var start_2 = scanner.getStartPos();
var children = void 0;
while (child = tryParse(function () { return parseChildParameterOrPropertyTag(target, name); })) {
if (child.kind === 290 || child.kind === 295) {
if (child.kind === 292 || child.kind === 297) {
children = ts.append(children, child);
}
}
@@ -16506,27 +16595,27 @@ var ts;
}
}
function parseReturnTag(atToken, tagName) {
if (ts.forEach(tags, function (t) { return t.kind === 291; })) {
if (ts.forEach(tags, function (t) { return t.kind === 293; })) {
parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText);
}
var result = createNode(291, atToken.pos);
var result = createNode(293, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = tryParseTypeExpression();
return finishNode(result);
}
function parseTypeTag(atToken, tagName) {
if (ts.forEach(tags, function (t) { return t.kind === 292; })) {
if (ts.forEach(tags, function (t) { return t.kind === 294; })) {
parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText);
}
var result = createNode(292, atToken.pos);
var result = createNode(294, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeExpression = parseJSDocTypeExpression(true);
return finishNode(result);
}
function parseAugmentsTag(atToken, tagName) {
var result = createNode(288, atToken.pos);
var result = createNode(289, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.class = parseExpressionWithTypeArgumentsForAugments();
@@ -16554,30 +16643,23 @@ var ts;
return node;
}
function parseClassTag(atToken, tagName) {
var tag = createNode(289, atToken.pos);
var tag = createNode(290, atToken.pos);
tag.atToken = atToken;
tag.tagName = tagName;
return finishNode(tag);
}
function parseTypedefTag(atToken, tagName) {
function parseTypedefTag(atToken, tagName, indent) {
var typeExpression = tryParseTypeExpression();
skipWhitespace();
var typedefTag = createNode(294, atToken.pos);
var typedefTag = createNode(296, atToken.pos);
typedefTag.atToken = atToken;
typedefTag.tagName = tagName;
typedefTag.fullName = parseJSDocTypeNameWithNamespace(0);
if (typedefTag.fullName) {
var rightNode = typedefTag.fullName;
while (true) {
if (rightNode.kind === 71 || !rightNode.body) {
typedefTag.name = rightNode.kind === 71 ? rightNode : rightNode.name;
break;
}
rightNode = rightNode.body;
}
}
typedefTag.fullName = parseJSDocTypeNameWithNamespace();
typedefTag.name = getJSDocTypeAliasName(typedefTag.fullName);
skipWhitespace();
typedefTag.comment = parseTagComments(indent);
typedefTag.typeExpression = typeExpression;
var end;
if (!typeExpression || isObjectOrObjectArrayTypeReference(typeExpression.type)) {
var child = void 0;
var jsdocTypeLiteral = void 0;
@@ -16587,7 +16669,7 @@ var ts;
if (!jsdocTypeLiteral) {
jsdocTypeLiteral = createNode(286, start_3);
}
if (child.kind === 292) {
if (child.kind === 294) {
if (childTypeTag) {
break;
}
@@ -16606,23 +16688,67 @@ var ts;
typedefTag.typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ?
childTypeTag.typeExpression :
finishNode(jsdocTypeLiteral);
end = typedefTag.typeExpression.end;
}
}
return finishNode(typedefTag);
function parseJSDocTypeNameWithNamespace(flags) {
var pos = scanner.getTokenPos();
var typeNameOrNamespaceName = parseJSDocIdentifierName();
if (typeNameOrNamespaceName && parseOptional(23)) {
var jsDocNamespaceNode = createNode(238, pos);
jsDocNamespaceNode.flags |= flags;
jsDocNamespaceNode.name = typeNameOrNamespaceName;
jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(4);
return finishNode(jsDocNamespaceNode);
return finishNode(typedefTag, end || typedefTag.comment !== undefined ? scanner.getStartPos() : (typedefTag.fullName || typedefTag.typeExpression || typedefTag.tagName).end);
}
function parseJSDocTypeNameWithNamespace(nested) {
var pos = scanner.getTokenPos();
var typeNameOrNamespaceName = parseJSDocIdentifierName();
if (typeNameOrNamespaceName && parseOptional(23)) {
var jsDocNamespaceNode = createNode(238, pos);
if (nested) {
jsDocNamespaceNode.flags |= 4;
}
if (typeNameOrNamespaceName && flags & 4) {
typeNameOrNamespaceName.isInJSDocNamespace = true;
jsDocNamespaceNode.name = typeNameOrNamespaceName;
jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(true);
return finishNode(jsDocNamespaceNode);
}
if (typeNameOrNamespaceName && nested) {
typeNameOrNamespaceName.isInJSDocNamespace = true;
}
return typeNameOrNamespaceName;
}
function parseCallbackTag(atToken, tagName, indent) {
var callbackTag = createNode(291, atToken.pos);
callbackTag.atToken = atToken;
callbackTag.tagName = tagName;
callbackTag.fullName = parseJSDocTypeNameWithNamespace();
callbackTag.name = getJSDocTypeAliasName(callbackTag.fullName);
skipWhitespace();
callbackTag.comment = parseTagComments(indent);
var child;
var start = scanner.getStartPos();
var jsdocSignature = createNode(287, start);
jsdocSignature.parameters = [];
while (child = tryParse(function () { return parseChildParameterOrPropertyTag(4); })) {
jsdocSignature.parameters = ts.append(jsdocSignature.parameters, child);
}
var returnTag = tryParse(function () {
if (token() === 57) {
nextJSDocToken();
var tag = parseTag(indent);
if (tag && tag.kind === 293) {
return tag;
}
}
});
if (returnTag) {
jsdocSignature.type = returnTag;
}
callbackTag.typeExpression = finishNode(jsdocSignature);
return finishNode(callbackTag);
}
function getJSDocTypeAliasName(fullName) {
if (fullName) {
var rightNode = fullName;
while (true) {
if (ts.isIdentifier(rightNode) || !rightNode.body) {
return ts.isIdentifier(rightNode) ? rightNode : rightNode.name;
}
rightNode = rightNode.body;
}
return typeNameOrNamespaceName;
}
}
function escapedTextsEqual(a, b) {
@@ -16638,7 +16764,7 @@ var ts;
return a.escapedText === b.escapedText;
}
function parseChildPropertyTag() {
return parseChildParameterOrPropertyTag(0);
return parseChildParameterOrPropertyTag(1);
}
function parseChildParameterOrPropertyTag(target, name) {
var canParseTag = true;
@@ -16648,7 +16774,8 @@ var ts;
case 57:
if (canParseTag) {
var child = tryParseChildTag(target);
if (child && child.kind === 290 &&
if (child && child.kind === 292 &&
target !== 4 &&
(ts.isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) {
return false;
}
@@ -16687,20 +16814,20 @@ var ts;
var t;
switch (tagName.escapedText) {
case "type":
return target === 0 && parseTypeTag(atToken, tagName);
return target === 1 && parseTypeTag(atToken, tagName);
case "prop":
case "property":
t = 0;
t = 1;
break;
case "arg":
case "argument":
case "param":
t = 1;
t = 2 | 4;
break;
default:
return false;
}
if (target !== t) {
if (!(target & t)) {
return false;
}
var tag = parseParameterOrPropertyTag(atToken, tagName, target, undefined);
@@ -16732,7 +16859,7 @@ var ts;
break;
}
}
var result = createNode(293, atToken.pos);
var result = createNode(295, atToken.pos);
result.atToken = atToken;
result.tagName = tagName;
result.typeParameters = createNodeArray(typeParameters, typeParametersPos);
@@ -16778,7 +16905,7 @@ var ts;
var pos = scanner.getTokenPos();
var end = scanner.getTextPos();
var result = createNode(71, pos);
result.escapedText = ts.escapeLeadingUnderscores(content.substring(pos, end));
result.escapedText = ts.escapeLeadingUnderscores(scanner.getTokenText());
finishNode(result, end);
nextJSDocToken();
return result;