mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'master' into fixAPISampleTests
This commit is contained in:
@@ -14890,6 +14890,10 @@ namespace ts {
|
||||
return getTypeFromTypeNode(jsDocFunctionType.parameters[0].type!);
|
||||
}
|
||||
}
|
||||
const thisTag = getJSDocThisTag(node);
|
||||
if (thisTag && thisTag.typeExpression) {
|
||||
return getTypeFromTypeNode(thisTag.typeExpression);
|
||||
}
|
||||
}
|
||||
|
||||
function isInConstructorArgumentInitializer(node: Node, constructorDecl: Node): boolean {
|
||||
|
||||
@@ -486,12 +486,18 @@
|
||||
<Item ItemId=";A_non_dry_build_would_build_project_0_6357" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A non-dry build would build project '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[非 DRY 的組建會建置專案 '{0}']]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";A_non_dry_build_would_delete_the_following_files_Colon_0_6356" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A non-dry build would delete the following files: {0}]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[非 DRY 的組建會刪除下列檔案: {0}]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -960,6 +966,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_braces_to_arrow_function_95059" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add braces to arrow function]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[將大括號新增至箭號函式]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_definite_assignment_assertion_to_property_0_95020" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add definite assignment assertion to property '{0}']]></Val>
|
||||
@@ -1029,6 +1044,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_or_remove_braces_in_an_arrow_function_95058" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add or remove braces in an arrow function]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[在箭號函式中新增或移除大括號]]></Val>
|
||||
</Tgt>
|
||||
</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>
|
||||
@@ -1773,18 +1797,27 @@
|
||||
<Item ItemId=";Build_all_projects_including_those_that_appear_to_be_up_to_date_6368" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Build all projects, including those that appear to be up to date]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[建置包括似乎已是最新狀態的所有專案]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Build one or more projects and their dependencies, if out of date]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[若已過期,則建置一或多個專案及其相依性]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Building_project_0_6358" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Building project '{0}'...]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[正在建置專案 '{0}'...]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -2865,6 +2898,9 @@
|
||||
<Item ItemId=";Delete_the_outputs_of_all_projects_6365" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Delete the outputs of all projects]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[刪除所有專案的輸出]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -3327,6 +3363,9 @@
|
||||
<Item ItemId=";Enable_verbose_logging_6366" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Enable verbose logging]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[啟用詳細資訊記錄]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5760,6 +5799,9 @@
|
||||
<Item ItemId=";Option_build_must_be_the_first_command_line_argument_6369" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option '--build' must be the first command line argument.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[選項 '--build' 必須是第一個命令列引數。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5802,6 +5844,9 @@
|
||||
<Item ItemId=";Options_0_and_1_cannot_be_combined_6370" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Options '{0}' and '{1}' cannot be combined.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[無法合併選項 '{0}' 與 '{1}'。]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -6240,42 +6285,63 @@
|
||||
<Item ItemId=";Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' can't be built because its dependency '{1}' has errors]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[因為專案 '{0}' 的相依性 '{1}' 發生錯誤,所以無法建置該專案]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' is out of date because its dependency '{1}' is out of date]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[因為專案 '{0}' 的相依性 '{1}' 已過期,所以該專案已過期]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[因為最舊的輸出 '{1}' 早於最新的輸入 '{2}',所以專案 '{0}' 已過期]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' is out of date because output file '{1}' does not exist]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[因為輸出檔案 '{1}' 不存在,所以專案 '{0}' 已過期]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Project_0_is_up_to_date_6361" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' is up to date]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[專案 '{0}' 為最新狀態]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[因為最新的輸入 '{1}' 早於最舊的輸出 '{2}',所以專案 '{0}' 為最新狀態]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' is up to date with .d.ts files from its dependencies]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[專案 '{0}' 為最新狀態,且有來自其相依性的 .d.ts 檔案]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -6291,6 +6357,9 @@
|
||||
<Item ItemId=";Projects_in_this_build_Colon_0_6355" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Projects in this build: {0}]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[此組建中的專案: {0}]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -6756,6 +6825,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Remove_braces_from_arrow_function_95060" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Remove braces from arrow function]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[從箭號函式移除大括號]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
||||
@@ -7332,6 +7410,9 @@
|
||||
<Item ItemId=";Show_what_would_be_built_or_deleted_if_specified_with_clean_6367" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Show what would be built (or deleted, if specified with '--clean')]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[顯示將會建置 (或刪除 - 若是指定有 '--clean') 的內容]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -7356,12 +7437,18 @@
|
||||
<Item ItemId=";Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Skipping build of project '{0}' because its dependency '{1}' has errors]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[因為專案 '{0}' 的相依性 '{1}' 發生錯誤,所以跳過建置該專案]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Skipping_clean_because_not_all_projects_could_be_located_6371" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Skipping clean because not all projects could be located]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[因為並非所有專案都可找到,所以跳過清理]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -8976,6 +9063,9 @@
|
||||
<Item ItemId=";Updating_output_timestamps_of_project_0_6359" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Updating output timestamps of project '{0}'...]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[正在更新專案 '{0}' 的輸出時間戳記...]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -9531,6 +9621,9 @@
|
||||
<Item ItemId=";delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[delete this - Project '{0}' is up to date because it was previously built]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[刪除此項目 - 因為先前已建置專案 '{0}',所以其為最新狀態]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
|
||||
@@ -495,12 +495,18 @@
|
||||
<Item ItemId=";A_non_dry_build_would_build_project_0_6357" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A non-dry build would build project '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Una compilación no DRY compilaría el proyecto "{0}"]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";A_non_dry_build_would_delete_the_following_files_Colon_0_6356" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A non-dry build would delete the following files: {0}]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Una compilación no DRY eliminaría los siguientes archivos: {0}]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -969,6 +975,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_braces_to_arrow_function_95059" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add braces to arrow function]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Agregar llaves a la función de flecha]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_definite_assignment_assertion_to_property_0_95020" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add definite assignment assertion to property '{0}']]></Val>
|
||||
@@ -1041,6 +1056,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_or_remove_braces_in_an_arrow_function_95058" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add or remove braces in an arrow function]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Agregar o quitar llaves en una función de flecha]]></Val>
|
||||
</Tgt>
|
||||
</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>
|
||||
@@ -1791,12 +1815,18 @@
|
||||
<Item ItemId=";Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Build one or more projects and their dependencies, if out of date]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Generar uno o varios proyectos y sus dependencias, si no están actualizados]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Building_project_0_6358" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Building project '{0}'...]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Compilando el proyecto "{0}"...]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -2877,6 +2907,9 @@
|
||||
<Item ItemId=";Delete_the_outputs_of_all_projects_6365" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Delete the outputs of all projects]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Eliminar las salidas de todos los proyectos]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -3339,6 +3372,9 @@
|
||||
<Item ItemId=";Enable_verbose_logging_6366" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Enable verbose logging]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Habilitar el registro detallado]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5772,6 +5808,9 @@
|
||||
<Item ItemId=";Option_build_must_be_the_first_command_line_argument_6369" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option '--build' must be the first command line argument.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[La opción "--build" debe ser el primer argumento de la línea de comandos.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5814,6 +5853,9 @@
|
||||
<Item ItemId=";Options_0_and_1_cannot_be_combined_6370" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Options '{0}' and '{1}' cannot be combined.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA["{0}" y "{1}" no se pueden combinar.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -6252,24 +6294,36 @@
|
||||
<Item ItemId=";Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' can't be built because its dependency '{1}' has errors]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[El proyecto "{0}" no puede generarse porque su dependencia "{1}" tiene errores]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' is out of date because its dependency '{1}' is out of date]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[El proyecto "{0}" está obsoleto porque su dependencia "{1}" no está actualizada]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[El proyecto "{0}" está obsoleto porque la salida más antigua "{1}" es anterior a la entrada más reciente "{2}"]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' is out of date because output file '{1}' does not exist]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[El proyecto "{0}" está obsoleto porque el archivo de salida "{1}" no existe]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -6282,12 +6336,18 @@
|
||||
<Item ItemId=";Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[El proyecto "{0}" está actualizado porque la entrada más reciente "{1}" es anterior a la salida más antigua "{2}"]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' is up to date with .d.ts files from its dependencies]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[El proyecto "{0}" está actualizado con archivos .d.ts de sus dependencias]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -6303,6 +6363,9 @@
|
||||
<Item ItemId=";Projects_in_this_build_Colon_0_6355" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Projects in this build: {0}]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Proyectos de esta compilación: {0}]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -6768,6 +6831,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Remove_braces_from_arrow_function_95060" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Remove braces from arrow function]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Quitar las llaves de la función de flecha]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
||||
@@ -7344,6 +7416,9 @@
|
||||
<Item ItemId=";Show_what_would_be_built_or_deleted_if_specified_with_clean_6367" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Show what would be built (or deleted, if specified with '--clean')]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Mostrar lo que podría compilarse (o eliminarse, si se especifica con "--clean")]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -7368,12 +7443,18 @@
|
||||
<Item ItemId=";Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Skipping build of project '{0}' because its dependency '{1}' has errors]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Omitiendo la compilación del proyecto "{0}" porque su dependencia "{1}" tiene errores]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Skipping_clean_because_not_all_projects_could_be_located_6371" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Skipping clean because not all projects could be located]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Omitiendo la limpieza porque no se encontraron todos los proyectos]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -8988,6 +9069,9 @@
|
||||
<Item ItemId=";Updating_output_timestamps_of_project_0_6359" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Updating output timestamps of project '{0}'...]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Actualizando las marcas de hora de salida del proyecto "{0}"...]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -9543,6 +9627,9 @@
|
||||
<Item ItemId=";delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[delete this - Project '{0}' is up to date because it was previously built]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[eliminar esto - El proyecto "{0}" está actualizado porque se compiló previamente]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
|
||||
@@ -495,12 +495,18 @@
|
||||
<Item ItemId=";A_non_dry_build_would_build_project_0_6357" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A non-dry build would build project '{0}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Une build non-DRY générerait le projet '{0}']]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";A_non_dry_build_would_delete_the_following_files_Colon_0_6356" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[A non-dry build would delete the following files: {0}]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Une build non-DRY supprimerait les fichiers suivants : {0}]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -969,6 +975,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_braces_to_arrow_function_95059" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add braces to arrow function]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ajouter des accolades à la fonction arrow]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_definite_assignment_assertion_to_property_0_95020" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add definite assignment assertion to property '{0}']]></Val>
|
||||
@@ -1041,6 +1056,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Add_or_remove_braces_in_an_arrow_function_95058" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Add or remove braces in an arrow function]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ajouter ou supprimer les accolades dans une fonction arrow]]></Val>
|
||||
</Tgt>
|
||||
</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>
|
||||
@@ -1785,18 +1809,27 @@
|
||||
<Item ItemId=";Build_all_projects_including_those_that_appear_to_be_up_to_date_6368" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Build all projects, including those that appear to be up to date]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Générer tous les projets, même ceux qui semblent être à jour]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Build one or more projects and their dependencies, if out of date]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Générer un ou plusieurs projets et leurs dépendances (s'ils sont obsolètes)]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Building_project_0_6358" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Building project '{0}'...]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Génération du projet '{0}'...]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -2877,6 +2910,9 @@
|
||||
<Item ItemId=";Delete_the_outputs_of_all_projects_6365" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Delete the outputs of all projects]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Supprimer les sorties de tous les projets]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -3339,6 +3375,9 @@
|
||||
<Item ItemId=";Enable_verbose_logging_6366" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Enable verbose logging]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Activer la journalisation détaillée]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5772,6 +5811,9 @@
|
||||
<Item ItemId=";Option_build_must_be_the_first_command_line_argument_6369" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Option '--build' must be the first command line argument.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[L'option '--build' doit être le premier argument de ligne de commande.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -5814,6 +5856,9 @@
|
||||
<Item ItemId=";Options_0_and_1_cannot_be_combined_6370" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Options '{0}' and '{1}' cannot be combined.]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Impossible de combiner les options '{0}' et '{1}'.]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -6252,42 +6297,63 @@
|
||||
<Item ItemId=";Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' can't be built because its dependency '{1}' has errors]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Impossible de générer le projet '{0}' car sa dépendance '{1}' comporte des erreurs]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' is out of date because its dependency '{1}' is out of date]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Le projet '{0}' est obsolète car sa dépendance '{1}' est obsolète]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Le projet '{0}' est obsolète car la sortie la plus ancienne ('{1}') est antérieure à l'entrée la plus récente '{2}']]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' is out of date because output file '{1}' does not exist]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Le projet '{0}' est obsolète car le fichier de sortie '{1}' n'existe pas]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Project_0_is_up_to_date_6361" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' is up to date]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Le projet '{0}' est à jour]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}']]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Le projet '{0}' est à jour car l'entrée la plus récente ('{1}') est antérieure à la sortie la plus ancienne ('{2}')]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Project '{0}' is up to date with .d.ts files from its dependencies]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Le projet '{0}' est à jour avec les fichiers .d.ts de ses dépendances]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -6303,6 +6369,9 @@
|
||||
<Item ItemId=";Projects_in_this_build_Colon_0_6355" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Projects in this build: {0}]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Projets dans cette build : {0}]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -6768,6 +6837,15 @@
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Remove_braces_from_arrow_function_95060" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Remove braces from arrow function]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Supprimer les accolades de la fonction arrow]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
|
||||
@@ -7344,6 +7422,9 @@
|
||||
<Item ItemId=";Show_what_would_be_built_or_deleted_if_specified_with_clean_6367" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Show what would be built (or deleted, if specified with '--clean')]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Montrer ce qui serait généré (ou supprimé si '--clean' est spécifié)]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -7368,12 +7449,18 @@
|
||||
<Item ItemId=";Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Skipping build of project '{0}' because its dependency '{1}' has errors]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ignorer la génération du projet '{0}' car sa dépendance '{1}' comporte des erreurs]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
<Item ItemId=";Skipping_clean_because_not_all_projects_could_be_located_6371" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Skipping clean because not all projects could be located]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Ignorer le nettoyage car tous les projets ne peuvent pas être localisés]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
@@ -8988,6 +9075,9 @@
|
||||
<Item ItemId=";Updating_output_timestamps_of_project_0_6359" ItemType="0" PsrId="306" Leaf="true">
|
||||
<Str Cat="Text">
|
||||
<Val><![CDATA[Updating output timestamps of project '{0}'...]]></Val>
|
||||
<Tgt Cat="Text" Stat="Loc" Orig="New">
|
||||
<Val><![CDATA[Mise à jour des horodatages de sortie du projet '{0}'...]]></Val>
|
||||
</Tgt>
|
||||
</Str>
|
||||
<Disp Icon="Str" />
|
||||
</Item>
|
||||
|
||||
@@ -491,6 +491,8 @@ namespace ts {
|
||||
case SyntaxKind.JSDocCallbackTag:
|
||||
return visitNode(cbNode, (node as JSDocCallbackTag).fullName) ||
|
||||
visitNode(cbNode, (node as JSDocCallbackTag).typeExpression);
|
||||
case SyntaxKind.JSDocThisTag:
|
||||
return visitNode(cbNode, (node as JSDocThisTag).typeExpression);
|
||||
case SyntaxKind.JSDocSignature:
|
||||
return visitNodes(cbNode, cbNodes, node.decorators) ||
|
||||
visitNodes(cbNode, cbNodes, node.modifiers) ||
|
||||
@@ -6497,6 +6499,9 @@ namespace ts {
|
||||
case "constructor":
|
||||
tag = parseClassTag(atToken, tagName);
|
||||
break;
|
||||
case "this":
|
||||
tag = parseThisTag(atToken, tagName);
|
||||
break;
|
||||
case "arg":
|
||||
case "argument":
|
||||
case "param":
|
||||
@@ -6768,6 +6773,15 @@ namespace ts {
|
||||
return finishNode(tag);
|
||||
}
|
||||
|
||||
function parseThisTag(atToken: AtToken, tagName: Identifier): JSDocThisTag {
|
||||
const tag = <JSDocThisTag>createNode(SyntaxKind.JSDocThisTag, atToken.pos);
|
||||
tag.atToken = atToken;
|
||||
tag.tagName = tagName;
|
||||
tag.typeExpression = parseJSDocTypeExpression(/*mayOmitBraces*/ true);
|
||||
skipWhitespace();
|
||||
return finishNode(tag);
|
||||
}
|
||||
|
||||
function parseTypedefTag(atToken: AtToken, tagName: Identifier, indent: number): JSDocTypedefTag {
|
||||
const typeExpression = tryParseTypeExpression();
|
||||
skipWhitespace();
|
||||
|
||||
@@ -371,6 +371,7 @@ namespace ts {
|
||||
JSDocCallbackTag,
|
||||
JSDocParameterTag,
|
||||
JSDocReturnTag,
|
||||
JSDocThisTag,
|
||||
JSDocTypeTag,
|
||||
JSDocTemplateTag,
|
||||
JSDocTypedefTag,
|
||||
@@ -2323,6 +2324,11 @@ namespace ts {
|
||||
kind: SyntaxKind.JSDocClassTag;
|
||||
}
|
||||
|
||||
export interface JSDocThisTag extends JSDocTag {
|
||||
kind: SyntaxKind.JSDocThisTag;
|
||||
typeExpression?: JSDocTypeExpression;
|
||||
}
|
||||
|
||||
export interface JSDocTemplateTag extends JSDocTag {
|
||||
kind: SyntaxKind.JSDocTemplateTag;
|
||||
typeParameters: NodeArray<TypeParameterDeclaration>;
|
||||
|
||||
@@ -4970,6 +4970,11 @@ namespace ts {
|
||||
return getFirstJSDocTag(node, isJSDocClassTag);
|
||||
}
|
||||
|
||||
/** Gets the JSDoc this tag for the node if present */
|
||||
export function getJSDocThisTag(node: Node): JSDocThisTag | undefined {
|
||||
return getFirstJSDocTag(node, isJSDocThisTag);
|
||||
}
|
||||
|
||||
/** Gets the JSDoc return tag for the node if present */
|
||||
export function getJSDocReturnTag(node: Node): JSDocReturnTag | undefined {
|
||||
return getFirstJSDocTag(node, isJSDocReturnTag);
|
||||
@@ -5701,6 +5706,10 @@ namespace ts {
|
||||
return node.kind === SyntaxKind.JSDocClassTag;
|
||||
}
|
||||
|
||||
export function isJSDocThisTag(node: Node): node is JSDocThisTag {
|
||||
return node.kind === SyntaxKind.JSDocThisTag;
|
||||
}
|
||||
|
||||
export function isJSDocParameterTag(node: Node): node is JSDocParameterTag {
|
||||
return node.kind === SyntaxKind.JSDocParameterTag;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
typescript_standalone.d.ts(21,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(21,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,42): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,46): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,57): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,48): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,44): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,35): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,45): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,56): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,71): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,48): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/APISample_Watch.ts (0 errors) ====
|
||||
/*
|
||||
* Note: This test is a public API sample. The sample sources can be found
|
||||
at: https://github.com/Microsoft/TypeScript-wiki/blob/master/Using-the-Compiler-API.md#writing-an-incremental-program-watcher
|
||||
* Please log a "breaking change" issue for any API breaking change affecting this issue
|
||||
*/
|
||||
|
||||
declare var process: any;
|
||||
declare var console: any;
|
||||
declare var os: any;
|
||||
|
||||
import ts = require("typescript");
|
||||
|
||||
const formatHost: ts.FormatDiagnosticsHost = {
|
||||
getCanonicalFileName: path => path,
|
||||
getCurrentDirectory: ts.sys.getCurrentDirectory,
|
||||
getNewLine: () => ts.sys.newLine,
|
||||
}
|
||||
|
||||
function watchMain() {
|
||||
const configPath = ts.findConfigFile(/*searchPath*/ "./", ts.sys.fileExists, "tsconfig.json");
|
||||
if (!configPath) {
|
||||
throw new Error("Could not find a valid 'tsconfig.json'.");
|
||||
}
|
||||
|
||||
// TypeScript can use several different program creation "strategies":
|
||||
// * ts.createEmitAndSemanticDiagnosticsBuilderProgram,
|
||||
// * ts.createSemanticDiagnosticsBuilderProgram
|
||||
// * ts.createAbstractBuilder
|
||||
// The first two produce "builder programs". These use an incremental strategy to only re-check and emit files whose
|
||||
// contents may have changed, or whose dependencies may have changes which may impact change the result of prior type-check and emit.
|
||||
// The last uses an ordinary program which does a full type check after every change.
|
||||
// Between `createEmitAndSemanticDiagnosticsBuilderProgram` and `createSemanticDiagnosticsBuilderProgram`, the only difference is emit.
|
||||
// For pure type-checking scenarios, or when another tool/process handles emit, using `createSemanticDiagnosticsBuilderProgram` may be more desirable.
|
||||
|
||||
// Note that there is another overload for `createWatchCompilerHost` that takes a set of root files.
|
||||
const host = ts.createWatchCompilerHost(configPath, {}, ts.sys,
|
||||
ts.createSemanticDiagnosticsBuilderProgram,
|
||||
reportDiagnostic,
|
||||
reportWatchStatusChanged,
|
||||
);
|
||||
|
||||
// You can technically override any given hook on the host, though you probably don't need to.
|
||||
// Note that we're assuming `origCreateProgram` and `origPostProgramCreate` doesn't use `this` at all.
|
||||
const origCreateProgram = host.createProgram;
|
||||
host.createProgram = (rootNames: ReadonlyArray<string>, options, host, oldProgram) => {
|
||||
console.log("** We're about to create the program! **");
|
||||
return origCreateProgram(rootNames, options, host, oldProgram);
|
||||
}
|
||||
const origPostProgramCreate = host.afterProgramCreate;
|
||||
|
||||
host.afterProgramCreate = program => {
|
||||
console.log("** We finished making the program! **");
|
||||
origPostProgramCreate!(program);
|
||||
};
|
||||
|
||||
// `createWatchProgram` creates an initial program, watches files, and updates the program over time.
|
||||
ts.createWatchProgram(host);
|
||||
}
|
||||
|
||||
function reportDiagnostic(diagnostic: ts.Diagnostic) {
|
||||
console.error("Error", diagnostic.code, ":",
|
||||
ts.flattenDiagnosticMessageText(diagnostic.messageText, formatHost.getNewLine())
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a diagnostic every time the watch status changes.
|
||||
* This is mainly for messages like "Starting compilation" or "Compilation completed".
|
||||
*/
|
||||
function reportWatchStatusChanged(diagnostic: ts.Diagnostic) {
|
||||
console.info(ts.formatDiagnostic(diagnostic, formatHost));
|
||||
}
|
||||
|
||||
watchMain();
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
typescript_standalone.d.ts(21,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(21,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,42): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,46): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,57): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,48): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,44): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,35): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,45): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,56): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,71): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,48): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/APISample_WatchWithDefaults.ts (0 errors) ====
|
||||
/*
|
||||
* Note: This test is a public API sample. This uses default sys interface without having to pass anything
|
||||
* Please log a "breaking change" issue for any API breaking change affecting this issue
|
||||
*/
|
||||
|
||||
declare var console: any;
|
||||
|
||||
import ts = require("typescript");
|
||||
|
||||
function watchMain() {
|
||||
const configPath = ts.findConfigFile(/*searchPath*/ "./", ts.sys.fileExists, "tsconfig.json");
|
||||
if (!configPath) {
|
||||
throw new Error("Could not find a valid 'tsconfig.json'.");
|
||||
}
|
||||
|
||||
// TypeScript can use several different program creation "strategies":
|
||||
// * ts.createEmitAndSemanticDiagnosticsBuilderProgram,
|
||||
// * ts.createSemanticDiagnosticsBuilderProgram
|
||||
// * ts.createAbstractBuilder
|
||||
// The first two produce "builder programs". These use an incremental strategy to only re-check and emit files whose
|
||||
// contents may have changed, or whose dependencies may have changes which may impact change the result of prior type-check and emit.
|
||||
// The last uses an ordinary program which does a full type check after every change.
|
||||
// Between `createEmitAndSemanticDiagnosticsBuilderProgram` and `createSemanticDiagnosticsBuilderProgram`, the only difference is emit.
|
||||
// For pure type-checking scenarios, or when another tool/process handles emit, using `createSemanticDiagnosticsBuilderProgram` may be more desirable.
|
||||
|
||||
// Note that there is another overload for `createWatchCompilerHost` that takes a set of root files.
|
||||
const host = ts.createWatchCompilerHost(configPath, {}, ts.sys);
|
||||
|
||||
// You can technically override any given hook on the host, though you probably don't need to.
|
||||
// Note that we're assuming `origCreateProgram` and `origPostProgramCreate` doesn't use `this` at all.
|
||||
const origCreateProgram = host.createProgram;
|
||||
host.createProgram = (rootNames, options, host, oldProgram) => {
|
||||
console.log("** We're about to create the program! **");
|
||||
return origCreateProgram(rootNames, options, host, oldProgram);
|
||||
}
|
||||
const origPostProgramCreate = host.afterProgramCreate;
|
||||
|
||||
host.afterProgramCreate = program => {
|
||||
console.log("** We finished making the program! **");
|
||||
origPostProgramCreate!(program);
|
||||
};
|
||||
|
||||
// `createWatchProgram` creates an initial program, watches files, and updates the program over time.
|
||||
ts.createWatchProgram(host);
|
||||
}
|
||||
|
||||
watchMain();
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
typescript_standalone.d.ts(21,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(21,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,42): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,46): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,57): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,48): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,44): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,35): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,45): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,56): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,71): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,48): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/APISample_WatchWithOwnWatchHost.ts (0 errors) ====
|
||||
/*
|
||||
* Note: This test is a public API sample. This sample verifies creating abstract builder to watch list of root files
|
||||
* Please log a "breaking change" issue for any API breaking change affecting this issue
|
||||
*/
|
||||
|
||||
declare var console: any;
|
||||
|
||||
import ts = require("typescript");
|
||||
|
||||
function watchMain() {
|
||||
// get list of files and compiler options somehow
|
||||
const files: string[] = [];
|
||||
const options: ts.CompilerOptions = {};
|
||||
|
||||
const host: ts.WatchCompilerHostOfFilesAndCompilerOptions<ts.BuilderProgram> = {
|
||||
rootFiles: files,
|
||||
options,
|
||||
|
||||
useCaseSensitiveFileNames: () => ts.sys.useCaseSensitiveFileNames,
|
||||
getNewLine: () => ts.sys.newLine,
|
||||
getCurrentDirectory: ts.sys.getCurrentDirectory,
|
||||
getDefaultLibFileName: options => ts.getDefaultLibFilePath(options),
|
||||
|
||||
fileExists: ts.sys.fileExists,
|
||||
readFile: ts.sys.readFile,
|
||||
directoryExists: ts.sys.directoryExists,
|
||||
getDirectories: ts.sys.getDirectories,
|
||||
readDirectory: ts.sys.readDirectory,
|
||||
realpath: ts.sys.realpath,
|
||||
|
||||
watchFile: ts.sys.watchFile!,
|
||||
watchDirectory: ts.sys.watchDirectory!,
|
||||
createProgram: ts.createAbstractBuilder
|
||||
};
|
||||
|
||||
// You can technically override any given hook on the host, though you probably don't need to.
|
||||
// Note that we're assuming `origCreateProgram` and `origPostProgramCreate` doesn't use `this` at all.
|
||||
const origCreateProgram = host.createProgram;
|
||||
host.createProgram = (rootNames, options, host, oldProgram) => {
|
||||
console.log("** We're about to create the program! **");
|
||||
return origCreateProgram(rootNames, options, host, oldProgram);
|
||||
}
|
||||
const origPostProgramCreate = host.afterProgramCreate;
|
||||
|
||||
host.afterProgramCreate = program => {
|
||||
console.log("** We finished making the program! **");
|
||||
origPostProgramCreate!(program);
|
||||
};
|
||||
|
||||
// `createWatchProgram` creates an initial program, watches files, and updates the program over time.
|
||||
ts.createWatchProgram(host);
|
||||
}
|
||||
|
||||
watchMain();
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
typescript_standalone.d.ts(21,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(21,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,42): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,46): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,57): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,48): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,44): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,35): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,45): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,56): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,71): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,48): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/APISample_compile.ts (0 errors) ====
|
||||
/*
|
||||
* Note: This test is a public API sample. The sample sources can be found
|
||||
at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-minimal-compiler
|
||||
* Please log a "breaking change" issue for any API breaking change affecting this issue
|
||||
*/
|
||||
|
||||
declare var process: any;
|
||||
declare var console: any;
|
||||
declare var os: any;
|
||||
|
||||
import ts = require("typescript");
|
||||
|
||||
export function compile(fileNames: string[], options: ts.CompilerOptions): void {
|
||||
var program = ts.createProgram(fileNames, options);
|
||||
var emitResult = program.emit();
|
||||
|
||||
var allDiagnostics = ts.getPreEmitDiagnostics(program);
|
||||
|
||||
allDiagnostics.forEach(diagnostic => {
|
||||
var message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
|
||||
if (!diagnostic.file) {
|
||||
console.log(message);
|
||||
return;
|
||||
}
|
||||
var { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start!);
|
||||
console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
|
||||
});
|
||||
|
||||
var exitCode = emitResult.emitSkipped ? 1 : 0;
|
||||
console.log(`Process exiting with code '${exitCode}'.`);
|
||||
process.exit(exitCode);
|
||||
}
|
||||
|
||||
compile(process.argv.slice(2), {
|
||||
noEmitOnError: true, noImplicitAny: true,
|
||||
target: ts.ScriptTarget.ES5, module: ts.ModuleKind.CommonJS
|
||||
});
|
||||
|
||||
@@ -0,0 +1,246 @@
|
||||
typescript_standalone.d.ts(21,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(21,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,42): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,46): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,57): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,48): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,44): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,35): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,45): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,56): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,71): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,48): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/APISample_jsdoc.ts (0 errors) ====
|
||||
/*
|
||||
* Note: This test is a public API sample. The original sources can be found
|
||||
* at: https://github.com/YousefED/typescript-json-schema
|
||||
* https://github.com/vega/ts-json-schema-generator
|
||||
* Please log a "breaking change" issue for any API breaking change affecting this issue
|
||||
*/
|
||||
|
||||
declare var console: any;
|
||||
|
||||
import * as ts from "typescript";
|
||||
|
||||
// excerpted from https://github.com/YousefED/typescript-json-schema
|
||||
// (converted from a method and modified; for example, `this: any` to compensate, among other changes)
|
||||
function parseCommentsIntoDefinition(this: any,
|
||||
symbol: ts.Symbol,
|
||||
definition: {description?: string, [s: string]: string | undefined},
|
||||
otherAnnotations: { [s: string]: true}): void {
|
||||
if (!symbol) {
|
||||
return;
|
||||
}
|
||||
|
||||
// the comments for a symbol
|
||||
let comments = symbol.getDocumentationComment(undefined);
|
||||
|
||||
if (comments.length) {
|
||||
definition.description = comments.map(comment => comment.kind === "lineBreak" ? comment.text : comment.text.trim().replace(/\r\n/g, "\n")).join("");
|
||||
}
|
||||
|
||||
// jsdocs are separate from comments
|
||||
const jsdocs = symbol.getJsDocTags();
|
||||
jsdocs.forEach(doc => {
|
||||
// if we have @TJS-... annotations, we have to parse them
|
||||
const { name, text } = doc;
|
||||
if (this.userValidationKeywords[name]) {
|
||||
definition[name] = this.parseValue(text);
|
||||
} else {
|
||||
// special annotations
|
||||
otherAnnotations[doc.name] = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// excerpted from https://github.com/vega/ts-json-schema-generator
|
||||
export interface Annotations {
|
||||
[name: string]: any;
|
||||
}
|
||||
function getAnnotations(this: any, node: ts.Node): Annotations | undefined {
|
||||
const symbol: ts.Symbol = (node as any).symbol;
|
||||
if (!symbol) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const jsDocTags: ts.JSDocTagInfo[] = symbol.getJsDocTags();
|
||||
if (!jsDocTags || !jsDocTags.length) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const annotations: Annotations = jsDocTags.reduce((result: Annotations, jsDocTag: ts.JSDocTagInfo) => {
|
||||
const value = this.parseJsDocTag(jsDocTag);
|
||||
if (value !== undefined) {
|
||||
result[jsDocTag.name] = value;
|
||||
}
|
||||
|
||||
return result;
|
||||
}, {});
|
||||
return Object.keys(annotations).length ? annotations : undefined;
|
||||
}
|
||||
|
||||
// these examples are artificial and mostly nonsensical
|
||||
function parseSpecificTags(node: ts.Node) {
|
||||
if (node.kind === ts.SyntaxKind.Parameter) {
|
||||
return ts.getJSDocParameterTags(node as ts.ParameterDeclaration);
|
||||
}
|
||||
if (node.kind === ts.SyntaxKind.FunctionDeclaration) {
|
||||
const func = node as ts.FunctionDeclaration;
|
||||
if (ts.hasJSDocParameterTags(func)) {
|
||||
const flat: ts.JSDocTag[] = [];
|
||||
for (const tags of func.parameters.map(ts.getJSDocParameterTags)) {
|
||||
if (tags) flat.push(...tags);
|
||||
}
|
||||
return flat;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getReturnTypeFromJSDoc(node: ts.Node) {
|
||||
if (node.kind === ts.SyntaxKind.FunctionDeclaration) {
|
||||
return ts.getJSDocReturnType(node);
|
||||
}
|
||||
let type = ts.getJSDocType(node);
|
||||
if (type && type.kind === ts.SyntaxKind.FunctionType) {
|
||||
return (type as ts.FunctionTypeNode).type;
|
||||
}
|
||||
}
|
||||
|
||||
function getAllTags(node: ts.Node) {
|
||||
ts.getJSDocTags(node);
|
||||
}
|
||||
|
||||
function getSomeOtherTags(node: ts.Node) {
|
||||
const tags: (ts.JSDocTag | undefined)[] = [];
|
||||
tags.push(ts.getJSDocAugmentsTag(node));
|
||||
tags.push(ts.getJSDocClassTag(node));
|
||||
tags.push(ts.getJSDocReturnTag(node));
|
||||
const type = ts.getJSDocTypeTag(node);
|
||||
if (type) {
|
||||
tags.push(type);
|
||||
}
|
||||
tags.push(ts.getJSDocTemplateTag(node));
|
||||
return tags;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
typescript_standalone.d.ts(21,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(21,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,42): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,46): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,57): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,48): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,44): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,35): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,45): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,56): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,71): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,48): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/APISample_linter.ts (0 errors) ====
|
||||
/*
|
||||
* Note: This test is a public API sample. The sample sources can be found
|
||||
at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#traversing-the-ast-with-a-little-linter
|
||||
* Please log a "breaking change" issue for any API breaking change affecting this issue
|
||||
*/
|
||||
|
||||
declare var process: any;
|
||||
declare var console: any;
|
||||
declare var readFileSync: any;
|
||||
|
||||
import * as ts from "typescript";
|
||||
|
||||
export function delint(sourceFile: ts.SourceFile) {
|
||||
delintNode(sourceFile);
|
||||
|
||||
function delintNode(node: ts.Node) {
|
||||
switch (node.kind) {
|
||||
case ts.SyntaxKind.ForStatement:
|
||||
case ts.SyntaxKind.ForInStatement:
|
||||
case ts.SyntaxKind.WhileStatement:
|
||||
case ts.SyntaxKind.DoStatement:
|
||||
if ((<ts.IterationStatement>node).statement.kind !== ts.SyntaxKind.Block) {
|
||||
report(node, "A looping statement's contents should be wrapped in a block body.");
|
||||
}
|
||||
break;
|
||||
|
||||
case ts.SyntaxKind.IfStatement:
|
||||
let ifStatement = (<ts.IfStatement>node);
|
||||
if (ifStatement.thenStatement.kind !== ts.SyntaxKind.Block) {
|
||||
report(ifStatement.thenStatement, "An if statement's contents should be wrapped in a block body.");
|
||||
}
|
||||
if (ifStatement.elseStatement &&
|
||||
ifStatement.elseStatement.kind !== ts.SyntaxKind.Block &&
|
||||
ifStatement.elseStatement.kind !== ts.SyntaxKind.IfStatement) {
|
||||
report(ifStatement.elseStatement, "An else statement's contents should be wrapped in a block body.");
|
||||
}
|
||||
break;
|
||||
|
||||
case ts.SyntaxKind.BinaryExpression:
|
||||
let op = (<ts.BinaryExpression>node).operatorToken.kind;
|
||||
if (op === ts.SyntaxKind.EqualsEqualsToken || op == ts.SyntaxKind.ExclamationEqualsToken) {
|
||||
report(node, "Use '===' and '!=='.")
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
ts.forEachChild(node, delintNode);
|
||||
}
|
||||
|
||||
function report(node: ts.Node, message: string) {
|
||||
let { line, character } = sourceFile.getLineAndCharacterOfPosition(node.getStart());
|
||||
console.log(`${sourceFile.fileName} (${line + 1},${character + 1}): ${message}`);
|
||||
}
|
||||
}
|
||||
|
||||
const fileNames: string[] = process.argv.slice(2);
|
||||
fileNames.forEach(fileName => {
|
||||
// Parse a file
|
||||
let sourceFile = ts.createSourceFile(fileName, readFileSync(fileName).toString(), ts.ScriptTarget.ES2015, /*setParentNodes */ true);
|
||||
|
||||
// delint it
|
||||
delint(sourceFile);
|
||||
});
|
||||
@@ -0,0 +1,168 @@
|
||||
typescript_standalone.d.ts(21,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(21,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,42): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,46): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,57): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,48): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,44): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,35): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,45): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,56): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,71): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,48): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/APISample_parseConfig.ts (0 errors) ====
|
||||
/*
|
||||
* Note: This test is a public API sample. The sample sources can be found
|
||||
at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-minimal-compiler
|
||||
* Please log a "breaking change" issue for any API breaking change affecting this issue
|
||||
*/
|
||||
|
||||
declare var process: any;
|
||||
declare var console: any;
|
||||
declare var os: any;
|
||||
|
||||
import ts = require("typescript");
|
||||
|
||||
function printError(error: ts.Diagnostic): void {
|
||||
if (!error) {
|
||||
return;
|
||||
}
|
||||
console.log(`${error.file && error.file.fileName}: ${error.messageText}`);
|
||||
}
|
||||
|
||||
export function createProgram(rootFiles: string[], compilerOptionsJson: string): ts.Program | undefined {
|
||||
const { config, error } = ts.parseConfigFileTextToJson("tsconfig.json", compilerOptionsJson)
|
||||
if (error) {
|
||||
printError(error);
|
||||
return undefined;
|
||||
}
|
||||
const basePath: string = process.cwd();
|
||||
const settings = ts.convertCompilerOptionsFromJson(config.config["compilerOptions"], basePath);
|
||||
if (!settings.options) {
|
||||
for (const err of settings.errors) {
|
||||
printError(err);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
return ts.createProgram(rootFiles, settings.options);
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
typescript_standalone.d.ts(21,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(21,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,42): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,46): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,57): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,48): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,44): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,35): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,45): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,56): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,71): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,48): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/APISample_transform.ts (0 errors) ====
|
||||
/*
|
||||
* Note: This test is a public API sample. The sample sources can be found
|
||||
at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-simple-transform-function
|
||||
* Please log a "breaking change" issue for any API breaking change affecting this issue
|
||||
*/
|
||||
|
||||
declare var console: any;
|
||||
|
||||
import * as ts from "typescript";
|
||||
|
||||
const source = "let x: string = 'string'";
|
||||
|
||||
let result = ts.transpile(source, { module: ts.ModuleKind.CommonJS });
|
||||
|
||||
console.log(JSON.stringify(result));
|
||||
@@ -0,0 +1,242 @@
|
||||
typescript_standalone.d.ts(21,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(21,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(8921,42): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9181,46): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9531,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9555,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(9642,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10807,57): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10818,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10828,48): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10903,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(10960,47): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11014,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11034,44): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11044,35): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11078,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11081,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11085,45): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11103,56): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11129,36): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11132,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11144,43): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11174,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11208,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11219,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11243,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11251,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11255,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11285,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11328,41): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11515,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11517,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11521,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11523,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11525,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11527,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11529,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11538,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11540,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11542,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11544,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11546,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11548,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11550,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11552,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11554,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11556,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11558,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11560,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11562,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11564,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11566,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11576,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11578,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11580,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11582,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11584,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11586,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11588,37): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11590,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11592,52): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11664,72): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11666,38): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11668,71): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11670,40): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,28): error TS1005: ';' expected.
|
||||
typescript_standalone.d.ts(11746,48): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/APISample_watcher.ts (0 errors) ====
|
||||
/*
|
||||
* Note: This test is a public API sample. The sample sources can be found
|
||||
at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#incremental-build-support-using-the-language-services
|
||||
* Please log a "breaking change" issue for any API breaking change affecting this issue
|
||||
*/
|
||||
|
||||
declare var process: any;
|
||||
declare var console: any;
|
||||
declare var fs: {
|
||||
existsSync(path: string): boolean;
|
||||
readdirSync(path: string): string[];
|
||||
readFileSync(filename: string, encoding?: string): string;
|
||||
writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; } | string): void;
|
||||
watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: (curr: { mtime: Date }, prev: { mtime: Date }) => void): void;
|
||||
};
|
||||
declare var path: any;
|
||||
|
||||
import * as ts from "typescript";
|
||||
|
||||
function watch(rootFileNames: string[], options: ts.CompilerOptions) {
|
||||
const files: ts.MapLike<{ version: number }> = {};
|
||||
|
||||
// initialize the list of files
|
||||
rootFileNames.forEach(fileName => {
|
||||
files[fileName] = { version: 0 };
|
||||
});
|
||||
|
||||
// Create the language service host to allow the LS to communicate with the host
|
||||
const servicesHost: ts.LanguageServiceHost = {
|
||||
getScriptFileNames: () => rootFileNames,
|
||||
getScriptVersion: (fileName) => files[fileName] && files[fileName].version.toString(),
|
||||
getScriptSnapshot: (fileName) => {
|
||||
if (!fs.existsSync(fileName)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return ts.ScriptSnapshot.fromString(fs.readFileSync(fileName).toString());
|
||||
},
|
||||
getCurrentDirectory: () => process.cwd(),
|
||||
getCompilationSettings: () => options,
|
||||
getDefaultLibFileName: (options) => ts.getDefaultLibFilePath(options),
|
||||
};
|
||||
|
||||
// Create the language service files
|
||||
const services = ts.createLanguageService(servicesHost, ts.createDocumentRegistry())
|
||||
|
||||
// Now let's watch the files
|
||||
rootFileNames.forEach(fileName => {
|
||||
// First time around, emit all files
|
||||
emitFile(fileName);
|
||||
|
||||
// Add a watch on the file to handle next change
|
||||
fs.watchFile(fileName,
|
||||
{ persistent: true, interval: 250 },
|
||||
(curr, prev) => {
|
||||
// Check timestamp
|
||||
if (+curr.mtime <= +prev.mtime) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Update the version to signal a change in the file
|
||||
files[fileName].version++;
|
||||
|
||||
// write the changes to disk
|
||||
emitFile(fileName);
|
||||
});
|
||||
});
|
||||
|
||||
function emitFile(fileName: string) {
|
||||
let output = services.getEmitOutput(fileName);
|
||||
|
||||
if (!output.emitSkipped) {
|
||||
console.log(`Emitting ${fileName}`);
|
||||
}
|
||||
else {
|
||||
console.log(`Emitting ${fileName} failed`);
|
||||
logErrors(fileName);
|
||||
}
|
||||
|
||||
output.outputFiles.forEach(o => {
|
||||
fs.writeFileSync(o.name, o.text, "utf8");
|
||||
});
|
||||
}
|
||||
|
||||
function logErrors(fileName: string) {
|
||||
let allDiagnostics = services.getCompilerOptionsDiagnostics()
|
||||
.concat(services.getSyntacticDiagnostics(fileName))
|
||||
.concat(services.getSemanticDiagnostics(fileName));
|
||||
|
||||
allDiagnostics.forEach(diagnostic => {
|
||||
let message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
|
||||
if (diagnostic.file) {
|
||||
let { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start!);
|
||||
console.log(` Error ${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
|
||||
}
|
||||
else {
|
||||
console.log(` Error: ${message}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize files constituting the program as all .ts files in the current directory
|
||||
const currentDirectoryFiles = fs.readdirSync(process.cwd()).
|
||||
filter(fileName=> fileName.length >= 3 && fileName.substr(fileName.length - 3, 3) === ".ts");
|
||||
|
||||
// Start the watcher
|
||||
watch(currentDirectoryFiles, { module: ts.ModuleKind.CommonJS });
|
||||
|
||||
+22
-14
File diff suppressed because one or more lines are too long
+22
-14
File diff suppressed because one or more lines are too long
@@ -0,0 +1,32 @@
|
||||
=== tests/cases/conformance/jsdoc/a.js ===
|
||||
/** @this {{ n: number }} Mount Holyoke Preparatory School
|
||||
* @param {string} s
|
||||
* @return {number}
|
||||
*/
|
||||
function f(s) {
|
||||
>f : Symbol(f, Decl(a.js, 0, 0))
|
||||
>s : Symbol(s, Decl(a.js, 4, 11))
|
||||
|
||||
return this.n + s.length
|
||||
>this.n : Symbol(n, Decl(a.js, 0, 12))
|
||||
>this : Symbol(__type, Decl(a.js, 0, 11))
|
||||
>n : Symbol(n, Decl(a.js, 0, 12))
|
||||
>s.length : Symbol(String.length, Decl(lib.es5.d.ts, --, --))
|
||||
>s : Symbol(s, Decl(a.js, 4, 11))
|
||||
>length : Symbol(String.length, Decl(lib.es5.d.ts, --, --))
|
||||
}
|
||||
|
||||
const o = {
|
||||
>o : Symbol(o, Decl(a.js, 8, 5))
|
||||
|
||||
f,
|
||||
>f : Symbol(f, Decl(a.js, 8, 11))
|
||||
|
||||
n: 1
|
||||
>n : Symbol(n, Decl(a.js, 9, 6))
|
||||
}
|
||||
o.f('hi')
|
||||
>o.f : Symbol(f, Decl(a.js, 8, 11))
|
||||
>o : Symbol(o, Decl(a.js, 8, 5))
|
||||
>f : Symbol(f, Decl(a.js, 8, 11))
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
=== tests/cases/conformance/jsdoc/a.js ===
|
||||
/** @this {{ n: number }} Mount Holyoke Preparatory School
|
||||
* @param {string} s
|
||||
* @return {number}
|
||||
*/
|
||||
function f(s) {
|
||||
>f : (s: string) => number
|
||||
>s : string
|
||||
|
||||
return this.n + s.length
|
||||
>this.n + s.length : number
|
||||
>this.n : number
|
||||
>this : { n: number; }
|
||||
>n : number
|
||||
>s.length : number
|
||||
>s : string
|
||||
>length : number
|
||||
}
|
||||
|
||||
const o = {
|
||||
>o : { [x: string]: any; f: (s: string) => number; n: number; }
|
||||
>{ f, n: 1} : { [x: string]: any; f: (s: string) => number; n: number; }
|
||||
|
||||
f,
|
||||
>f : (s: string) => number
|
||||
|
||||
n: 1
|
||||
>n : number
|
||||
>1 : 1
|
||||
}
|
||||
o.f('hi')
|
||||
>o.f('hi') : number
|
||||
>o.f : (s: string) => number
|
||||
>o : { [x: string]: any; f: (s: string) => number; n: number; }
|
||||
>f : (s: string) => number
|
||||
>'hi' : "hi"
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// @noEmit: true
|
||||
// @allowJs: true
|
||||
// @checkJs: true
|
||||
// @strict: true
|
||||
// @Filename: a.js
|
||||
|
||||
/** @this {{ n: number }} Mount Holyoke Preparatory School
|
||||
* @param {string} s
|
||||
* @return {number}
|
||||
*/
|
||||
function f(s) {
|
||||
return this.n + s.length
|
||||
}
|
||||
|
||||
const o = {
|
||||
f,
|
||||
n: 1
|
||||
}
|
||||
o.f('hi')
|
||||
Reference in New Issue
Block a user