mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'master' into restTuples
# Conflicts: # tests/baselines/reference/APISample_Watch.errors.txt # tests/baselines/reference/APISample_WatchWithDefaults.errors.txt # tests/baselines/reference/APISample_WatchWithOwnWatchHost.errors.txt # tests/baselines/reference/APISample_compile.errors.txt # tests/baselines/reference/APISample_jsdoc.errors.txt # tests/baselines/reference/APISample_linter.errors.txt # tests/baselines/reference/APISample_parseConfig.errors.txt # tests/baselines/reference/APISample_transform.errors.txt # tests/baselines/reference/APISample_watcher.errors.txt # tests/baselines/reference/api/tsserverlibrary.d.ts # tests/baselines/reference/api/typescript.d.ts
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
* text eol=lf
|
||||
* text eol=lf
|
||||
@@ -13,6 +13,7 @@ See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */
|
||||
|
||||
|
||||
"use strict";
|
||||
var fs = require("fs");
|
||||
function pipeExists(name) {
|
||||
|
||||
@@ -49,6 +49,8 @@
|
||||
"A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434": "Uma declaração de namespace não pode estar localizada antes de uma classe ou função com a qual ela é mesclada.",
|
||||
"A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235": "Uma declaração de namespace só é permitida e um namespace ou módulo.",
|
||||
"A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_7038": "Uma importação de estilo do namespace não pode ser chamada nem construída e causará uma falha no tempo de execução.",
|
||||
"A_non_dry_build_would_build_project_0_6357": "A non-dry build would build project '{0}'",
|
||||
"A_non_dry_build_would_delete_the_following_files_Colon_0_6356": "A non-dry build would delete the following files: {0}",
|
||||
"A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371": "Um inicializador de parâmetro só é permitido em uma implementação de função ou de construtor.",
|
||||
"A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317": "Uma propriedade de parâmetro não pode ser declarada usando um parâmetro rest.",
|
||||
"A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369": "Uma propriedade de parâmetro somente é permitida em uma implementação de construtor.",
|
||||
@@ -189,6 +191,9 @@
|
||||
"Binary_digit_expected_1177": "Dígito binário esperado.",
|
||||
"Binding_element_0_implicitly_has_an_1_type_7031": "O elemento de associação '{0}' tem implicitamente um tipo '{1}'.",
|
||||
"Block_scoped_variable_0_used_before_its_declaration_2448": "Variável de escopo de bloco '{0}' usada antes da sua declaração.",
|
||||
"Build_all_projects_including_those_that_appear_to_be_up_to_date_6368": "Build all projects, including those that appear to be up to date",
|
||||
"Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364": "Build one or more projects and their dependencies, if out of date",
|
||||
"Building_project_0_6358": "Building project '{0}'...",
|
||||
"Call_decorator_expression_90028": "Chamar expressão do decorador",
|
||||
"Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020": "Assinatura de chamada, que não tem a anotação de tipo de retorno, implicitamente tem um tipo de retorno 'any'.",
|
||||
"Call_target_does_not_contain_any_signatures_2346": "O destino da chamada não contém nenhuma assinatura.",
|
||||
@@ -208,7 +213,7 @@
|
||||
"Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057": "Não é possível encontrar um arquivo tsconfig.json no diretório especificado: '{0}'.",
|
||||
"Cannot_find_global_type_0_2318": "Não é possível encontrar o tipo global '{0}'.",
|
||||
"Cannot_find_global_value_0_2468": "Não é possível encontrar o valor global '{0}'.",
|
||||
"Cannot_find_lib_definition_for_0_2726": "Cannot find lib definition for '{0}'.",
|
||||
"Cannot_find_lib_definition_for_0_2726": "Não é possível encontrar a definição de lib para '{0}'.",
|
||||
"Cannot_find_lib_definition_for_0_Did_you_mean_1_2727": "Cannot find lib definition for '{0}'. Did you mean '{1}'?",
|
||||
"Cannot_find_module_0_2307": "Não é possível encontrar o módulo '{0}'.",
|
||||
"Cannot_find_name_0_2304": "Não é possível encontrar o nome '{0}'.",
|
||||
@@ -304,6 +309,7 @@
|
||||
"Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207": "Os decoradores não podem ser aplicados a vários acessadores get/set de mesmo nome.",
|
||||
"Default_export_of_the_module_has_or_is_using_private_name_0_4082": "A exportação padrão do módulo tem ou está usando o nome particular '{0}'.",
|
||||
"Delete_all_unused_declarations_95024": "Excluir todas as declarações não usadas",
|
||||
"Delete_the_outputs_of_all_projects_6365": "Delete the outputs of all projects",
|
||||
"Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084": "[Preterido] Use '--jsxFactory' no lugar. Especifique o objeto invocado para createElement ao direcionar uma emissão de JSX 'react'",
|
||||
"Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170": "[Preterido] Use '--outFile' no lugar. Concatene e emita uma saída para um arquivo único",
|
||||
"Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160": "[Preterido] Use '--skipLibCheck' no lugar. Ignore a verificação de tipo dos arquivos de declaração de biblioteca padrão.",
|
||||
@@ -354,6 +360,7 @@
|
||||
"Enable_strict_checking_of_property_initialization_in_classes_6187": "Habilite a verificação estrita de inicialização de propriedade nas classes.",
|
||||
"Enable_strict_null_checks_6113": "Habilite verificações nulas estritas.",
|
||||
"Enable_tracing_of_the_name_resolution_process_6085": "Habilite o rastreio do processo de resolução de nome.",
|
||||
"Enable_verbose_logging_6366": "Enable verbose logging",
|
||||
"Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037": "Permite emissão de interoperabilidade entre CommonJS e Módulos ES através da criação de objetos de namespace para todas as importações. Implica em 'allowSyntheticDefaultImports'.",
|
||||
"Enables_experimental_support_for_ES7_async_functions_6068": "Habilita o suporte experimental para funções assíncronas de ES7.",
|
||||
"Enables_experimental_support_for_ES7_decorators_6065": "Habilita o suporte experimental para decoradores ES7.",
|
||||
@@ -615,10 +622,12 @@
|
||||
"Option_0_cannot_be_specified_without_specifying_option_1_5052": "A opção '{0}' não pode ser especificada sem especificar a opção '{1}'.",
|
||||
"Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069": "A opção '{0}' não pode ser especificada sem especificar a opção '{1}' ou a opção '{2}'.",
|
||||
"Option_0_should_have_array_of_strings_as_a_value_6103": "A opção '{0}' deve ter matriz de cadeias de um valor.",
|
||||
"Option_build_must_be_the_first_command_line_argument_6369": "Option '--build' must be the first command line argument.",
|
||||
"Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047": "A opção 'isolatedModules' só pode ser usada quando nenhuma opção de '--module' for fornecida ou a opção 'target' for 'ES2015' ou superior.",
|
||||
"Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060": "A opção 'paths' não pode ser usada sem se especificar a opção '--baseUrl'.",
|
||||
"Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042": "A opção 'project' não pode ser mesclada com arquivos de origem em uma linha de comando.",
|
||||
"Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070": "A opção '--resolveJsonModule' não pode ser especificada sem a estratégia de resolução de módulo de 'nó'.",
|
||||
"Options_0_and_1_cannot_be_combined_6370": "Options '{0}' and '{1}' cannot be combined.",
|
||||
"Options_Colon_6027": "Opções:",
|
||||
"Output_directory_for_generated_declaration_files_6166": "Diretório de saída para os arquivos de declaração gerados.",
|
||||
"Output_file_0_from_project_1_does_not_exist_6309": "O arquivo de saída '{0}' do projeto '{1}' não existe",
|
||||
@@ -666,7 +675,15 @@
|
||||
"Print_names_of_generated_files_part_of_the_compilation_6154": "Nomes de impressão das partes dos arquivos gerados da compilação.",
|
||||
"Print_the_compiler_s_version_6019": "Imprima a versão do compilador.",
|
||||
"Print_this_message_6017": "Imprima esta mensagem.",
|
||||
"Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363": "Project '{0}' can't be built because its dependency '{1}' has errors",
|
||||
"Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353": "Project '{0}' is out of date because its dependency '{1}' is out of date",
|
||||
"Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350": "Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}'",
|
||||
"Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352": "Project '{0}' is out of date because output file '{1}' does not exist",
|
||||
"Project_0_is_up_to_date_6361": "Project '{0}' is up to date",
|
||||
"Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351": "Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}'",
|
||||
"Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354": "Project '{0}' is up to date with .d.ts files from its dependencies",
|
||||
"Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202": "Referências de projeto não podem formar um gráfico circular. Ciclo detectado: {0}",
|
||||
"Projects_in_this_build_Colon_0_6355": "Projects in this build: {0}",
|
||||
"Projects_to_reference_6300": "Projetos para referência",
|
||||
"Property_0_does_not_exist_on_const_enum_1_2479": "A propriedade '{0}' não existe na enumeração 'const' '{1}'.",
|
||||
"Property_0_does_not_exist_on_type_1_2339": "A propriedade '{0}' não existe no tipo '{1}'.",
|
||||
@@ -780,8 +797,11 @@
|
||||
"Show_all_compiler_options_6169": "Mostrar todas as opções do compilador.",
|
||||
"Show_diagnostic_information_6149": "Mostras as informações de diagnóstico.",
|
||||
"Show_verbose_diagnostic_information_6150": "Mostras as informações detalhadas de diagnóstico.",
|
||||
"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367": "Show what would be built (or deleted, if specified with '--clean')",
|
||||
"Signature_0_must_be_a_type_predicate_1224": "A assinatura '{0}' deve ser um predicado de tipo.",
|
||||
"Skip_type_checking_of_declaration_files_6012": "Ignorar a verificação de tipo dos arquivos de declaração.",
|
||||
"Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362": "Skipping build of project '{0}' because its dependency '{1}' has errors",
|
||||
"Skipping_clean_because_not_all_projects_could_be_located_6371": "Skipping clean because not all projects could be located",
|
||||
"Source_Map_Options_6175": "Opções do Sourcemap",
|
||||
"Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382": "A assinatura de sobrecarga especializada não pode ser atribuída a qualquer assinatura não especializada.",
|
||||
"Specifier_of_dynamic_import_cannot_be_spread_element_1325": "O especificador de importação dinâmica não pode ser o elemento de difusão.",
|
||||
@@ -957,6 +977,7 @@
|
||||
"Unterminated_template_literal_1160": "Literal de modelo não finalizado.",
|
||||
"Untyped_function_calls_may_not_accept_type_arguments_2347": "Chamadas de função não tipadas não podem aceitar argumentos de tipo.",
|
||||
"Unused_label_7028": "Rótulo não utilizado.",
|
||||
"Updating_output_timestamps_of_project_0_6359": "Updating output timestamps of project '{0}'...",
|
||||
"Use_synthetic_default_member_95016": "Use o membro sintético 'padrão'.",
|
||||
"Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494": "Há suporte para o uso de uma cadeia de caracteres em uma instrução 'for...of' somente no ECMAScript 5 e superior.",
|
||||
"VERSION_6036": "VERSÃO",
|
||||
@@ -1017,6 +1038,7 @@
|
||||
"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478": "O inicializador de membro de enumeração 'const' foi avaliado como o valor não permitido 'NaN'.",
|
||||
"const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475": "Enumerações 'const' só podem ser usadas em expressões de acesso de índice ou propriedade, ou então do lado direito de uma consulta de tipo, declaração de importação ou atribuição de exportação.",
|
||||
"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102": "'delete' não pode ser chamado em um identificador no modo estrito.",
|
||||
"delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360": "delete this - Project '{0}' is up to date because it was previously built",
|
||||
"enum_declarations_can_only_be_used_in_a_ts_file_8015": "'enum declarations' só podem ser usadas em um arquivo .ts.",
|
||||
"export_can_only_be_used_in_a_ts_file_8003": "'export=' só pode ser usado em um arquivo .ts.",
|
||||
"export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668": "O modificador 'export' não pode ser aplicado a módulos de ambiente e acréscimos de módulo, pois eles estão sempre visíveis.",
|
||||
|
||||
+12095
-28231
File diff suppressed because one or more lines are too long
+315
-295
File diff suppressed because it is too large
Load Diff
Vendored
+7116
-1584
File diff suppressed because one or more lines are too long
@@ -2712,7 +2712,7 @@ var ts;
|
||||
SymbolFlags[SymbolFlags["AliasExcludes"] = 2097152] = "AliasExcludes";
|
||||
SymbolFlags[SymbolFlags["ModuleMember"] = 2623475] = "ModuleMember";
|
||||
SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal";
|
||||
SymbolFlags[SymbolFlags["HasExports"] = 1952] = "HasExports";
|
||||
SymbolFlags[SymbolFlags["HasExports"] = 1955] = "HasExports";
|
||||
SymbolFlags[SymbolFlags["HasMembers"] = 6240] = "HasMembers";
|
||||
SymbolFlags[SymbolFlags["BlockScoped"] = 418] = "BlockScoped";
|
||||
SymbolFlags[SymbolFlags["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor";
|
||||
@@ -25533,7 +25533,7 @@ var ts;
|
||||
symbol.flags |= symbolFlags;
|
||||
node.symbol = symbol;
|
||||
symbol.declarations = ts.append(symbol.declarations, node);
|
||||
if (symbolFlags & 1952 /* HasExports */ && !symbol.exports) {
|
||||
if (symbolFlags & 1955 /* HasExports */ && !symbol.exports) {
|
||||
symbol.exports = ts.createSymbolTable();
|
||||
}
|
||||
if (symbolFlags & 6240 /* HasMembers */ && !symbol.members) {
|
||||
@@ -28902,7 +28902,7 @@ var ts;
|
||||
}
|
||||
var t = getTypeOfSymbol(symbol);
|
||||
visitType(t); // Should handle members on classes and such
|
||||
if (symbol.flags & 1952 /* HasExports */) {
|
||||
if (symbol.flags & 1955 /* HasExports */) {
|
||||
symbol.exports.forEach(visitSymbol);
|
||||
}
|
||||
ts.forEach(symbol.declarations, function (d) {
|
||||
@@ -31200,7 +31200,7 @@ var ts;
|
||||
// The ES6 spec permits export * declarations in a module to circularly reference the module itself. For example,
|
||||
// module 'a' can 'export * from "b"' and 'b' can 'export * from "a"' without error.
|
||||
function visit(symbol) {
|
||||
if (!(symbol && symbol.flags & 1952 /* HasExports */ && ts.pushIfUnique(visitedSymbols, symbol))) {
|
||||
if (!(symbol && symbol.flags & 1955 /* HasExports */ && ts.pushIfUnique(visitedSymbols, symbol))) {
|
||||
return;
|
||||
}
|
||||
var symbols = ts.cloneMap(symbol.exports);
|
||||
|
||||
Vendored
+256
-76
@@ -13,6 +13,12 @@ See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */
|
||||
|
||||
|
||||
declare namespace ts {
|
||||
const versionMajorMinor = "3.0";
|
||||
/** The version of the TypeScript compiler release */
|
||||
const version: string;
|
||||
}
|
||||
declare namespace ts {
|
||||
/**
|
||||
* Type of objects whose values are all of the same type.
|
||||
@@ -22,6 +28,9 @@ declare namespace ts {
|
||||
interface MapLike<T> {
|
||||
[index: string]: T;
|
||||
}
|
||||
interface SortedArray<T> extends Array<T> {
|
||||
" __sortedArrayBrand": any;
|
||||
}
|
||||
/** ES6 Map interface, only read methods included. */
|
||||
interface ReadonlyMap<T> {
|
||||
get(key: string): T | undefined;
|
||||
@@ -52,6 +61,8 @@ declare namespace ts {
|
||||
interface Push<T> {
|
||||
push(...values: T[]): void;
|
||||
}
|
||||
}
|
||||
declare namespace ts {
|
||||
type Path = string & {
|
||||
__pathBrand: any;
|
||||
};
|
||||
@@ -2071,7 +2082,7 @@ declare namespace ts {
|
||||
AliasExcludes = 2097152,
|
||||
ModuleMember = 2623475,
|
||||
ExportHasLocal = 944,
|
||||
HasExports = 1952,
|
||||
HasExports = 1955,
|
||||
HasMembers = 6240,
|
||||
BlockScoped = 418,
|
||||
PropertyOrAccessor = 98308,
|
||||
@@ -2906,9 +2917,6 @@ declare namespace ts {
|
||||
span: TextSpan;
|
||||
newLength: number;
|
||||
}
|
||||
interface SortedArray<T> extends Array<T> {
|
||||
" __sortedArrayBrand": any;
|
||||
}
|
||||
interface SyntaxList extends Node {
|
||||
_children: Node[];
|
||||
}
|
||||
@@ -2978,15 +2986,6 @@ declare namespace ts {
|
||||
IndexSignatureParameters = 4432
|
||||
}
|
||||
}
|
||||
declare namespace ts {
|
||||
const versionMajorMinor = "3.0";
|
||||
/** The version of the TypeScript compiler release */
|
||||
const version: string;
|
||||
}
|
||||
declare namespace ts {
|
||||
function isExternalModuleNameRelative(moduleName: string): boolean;
|
||||
function sortAndDeduplicateDiagnostics<T extends Diagnostic>(diagnostics: ReadonlyArray<T>): T[];
|
||||
}
|
||||
declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
|
||||
declare function clearTimeout(handle: any): void;
|
||||
declare namespace ts {
|
||||
@@ -3099,6 +3098,11 @@ declare namespace ts {
|
||||
function isIdentifierPart(ch: number, languageVersion: ScriptTarget | undefined): boolean;
|
||||
function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, textInitial?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner;
|
||||
}
|
||||
/** Non-internal stuff goes here */
|
||||
declare namespace ts {
|
||||
function isExternalModuleNameRelative(moduleName: string): boolean;
|
||||
function sortAndDeduplicateDiagnostics<T extends Diagnostic>(diagnostics: ReadonlyArray<T>): T[];
|
||||
}
|
||||
declare namespace ts {
|
||||
function getDefaultLibFileName(options: CompilerOptions): string;
|
||||
function textSpanEnd(span: TextSpan): number;
|
||||
@@ -3484,6 +3488,79 @@ declare namespace ts {
|
||||
function isExternalModule(file: SourceFile): boolean;
|
||||
function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
|
||||
}
|
||||
declare namespace ts {
|
||||
function parseCommandLine(commandLine: ReadonlyArray<string>, readFile?: (path: string) => string | undefined): ParsedCommandLine;
|
||||
type DiagnosticReporter = (diagnostic: Diagnostic) => void;
|
||||
/**
|
||||
* Reports config file diagnostics
|
||||
*/
|
||||
interface ConfigFileDiagnosticsReporter {
|
||||
/**
|
||||
* Reports unrecoverable error when parsing config file
|
||||
*/
|
||||
onUnRecoverableConfigFileDiagnostic: DiagnosticReporter;
|
||||
}
|
||||
/**
|
||||
* Interface extending ParseConfigHost to support ParseConfigFile that reads config file and reports errors
|
||||
*/
|
||||
interface ParseConfigFileHost extends ParseConfigHost, ConfigFileDiagnosticsReporter {
|
||||
getCurrentDirectory(): string;
|
||||
}
|
||||
/**
|
||||
* Reads the config file, reports errors if any and exits if the config file cannot be found
|
||||
*/
|
||||
function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions, host: ParseConfigFileHost): ParsedCommandLine | undefined;
|
||||
/**
|
||||
* Read tsconfig.json file
|
||||
* @param fileName The path to the config file
|
||||
*/
|
||||
function readConfigFile(fileName: string, readFile: (path: string) => string | undefined): {
|
||||
config?: any;
|
||||
error?: Diagnostic;
|
||||
};
|
||||
/**
|
||||
* Parse the text of the tsconfig.json file
|
||||
* @param fileName The path to the config file
|
||||
* @param jsonText The text of the config file
|
||||
*/
|
||||
function parseConfigFileTextToJson(fileName: string, jsonText: string): {
|
||||
config?: any;
|
||||
error?: Diagnostic;
|
||||
};
|
||||
/**
|
||||
* Read tsconfig.json file
|
||||
* @param fileName The path to the config file
|
||||
*/
|
||||
function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile;
|
||||
/**
|
||||
* Convert the json syntax tree into the json value
|
||||
*/
|
||||
function convertToObject(sourceFile: JsonSourceFile, errors: Push<Diagnostic>): any;
|
||||
/**
|
||||
* Parse the contents of a config file (tsconfig.json).
|
||||
* @param json The contents of the config file to parse
|
||||
* @param host Instance of ParseConfigHost used to enumerate files in folder.
|
||||
* @param basePath A root directory to resolve relative path entries in the config
|
||||
* file to. e.g. outDir
|
||||
*/
|
||||
function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray<FileExtensionInfo>): ParsedCommandLine;
|
||||
/**
|
||||
* Parse the contents of a config file (tsconfig.json).
|
||||
* @param jsonNode The contents of the config file to parse
|
||||
* @param host Instance of ParseConfigHost used to enumerate files in folder.
|
||||
* @param basePath A root directory to resolve relative path entries in the config
|
||||
* file to. e.g. outDir
|
||||
*/
|
||||
function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray<FileExtensionInfo>): ParsedCommandLine;
|
||||
function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
|
||||
options: CompilerOptions;
|
||||
errors: Diagnostic[];
|
||||
};
|
||||
function convertTypeAcquisitionFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
|
||||
options: TypeAcquisition;
|
||||
errors: Diagnostic[];
|
||||
};
|
||||
}
|
||||
declare namespace ts {
|
||||
function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined;
|
||||
/**
|
||||
@@ -4311,76 +4388,179 @@ declare namespace ts {
|
||||
function createWatchProgram<T extends BuilderProgram>(host: WatchCompilerHostOfConfigFile<T>): WatchOfConfigFile<T>;
|
||||
}
|
||||
declare namespace ts {
|
||||
function parseCommandLine(commandLine: ReadonlyArray<string>, readFile?: (path: string) => string | undefined): ParsedCommandLine;
|
||||
type DiagnosticReporter = (diagnostic: Diagnostic) => void;
|
||||
/**
|
||||
* Reports config file diagnostics
|
||||
* Branded string for keeping track of when we've turned an ambiguous path
|
||||
* specified like "./blah" to an absolute path to an actual
|
||||
* tsconfig file, e.g. "/root/blah/tsconfig.json"
|
||||
*/
|
||||
interface ConfigFileDiagnosticsReporter {
|
||||
type ResolvedConfigFileName = string & {
|
||||
_isResolvedConfigFileName: never;
|
||||
};
|
||||
interface BuildHost {
|
||||
verbose(diag: DiagnosticMessage, ...args: string[]): void;
|
||||
error(diag: DiagnosticMessage, ...args: string[]): void;
|
||||
errorDiagnostic(diag: Diagnostic): void;
|
||||
message(diag: DiagnosticMessage, ...args: string[]): void;
|
||||
}
|
||||
/**
|
||||
* A BuildContext tracks what's going on during the course of a build.
|
||||
*
|
||||
* Callers may invoke any number of build requests within the same context;
|
||||
* until the context is reset, each project will only be built at most once.
|
||||
*
|
||||
* Example: In a standard setup where project B depends on project A, and both are out of date,
|
||||
* a failed build of A will result in A remaining out of date. When we try to build
|
||||
* B, we should immediately bail instead of recomputing A's up-to-date status again.
|
||||
*
|
||||
* This also matters for performing fast (i.e. fake) downstream builds of projects
|
||||
* when their upstream .d.ts files haven't changed content (but have newer timestamps)
|
||||
*/
|
||||
interface BuildContext {
|
||||
options: BuildOptions;
|
||||
/**
|
||||
* Reports unrecoverable error when parsing config file
|
||||
* Map from output file name to its pre-build timestamp
|
||||
*/
|
||||
onUnRecoverableConfigFileDiagnostic: DiagnosticReporter;
|
||||
unchangedOutputs: FileMap<Date>;
|
||||
/**
|
||||
* Map from config file name to up-to-date status
|
||||
*/
|
||||
projectStatus: FileMap<UpToDateStatus>;
|
||||
invalidatedProjects: FileMap<true>;
|
||||
queuedProjects: FileMap<true>;
|
||||
missingRoots: Map<true>;
|
||||
}
|
||||
/**
|
||||
* Interface extending ParseConfigHost to support ParseConfigFile that reads config file and reports errors
|
||||
*/
|
||||
interface ParseConfigFileHost extends ParseConfigHost, ConfigFileDiagnosticsReporter {
|
||||
getCurrentDirectory(): string;
|
||||
type Mapper = ReturnType<typeof createDependencyMapper>;
|
||||
interface DependencyGraph {
|
||||
buildQueue: ResolvedConfigFileName[];
|
||||
dependencyMap: Mapper;
|
||||
}
|
||||
/**
|
||||
* Reads the config file, reports errors if any and exits if the config file cannot be found
|
||||
*/
|
||||
function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions, host: ParseConfigFileHost): ParsedCommandLine | undefined;
|
||||
/**
|
||||
* Read tsconfig.json file
|
||||
* @param fileName The path to the config file
|
||||
*/
|
||||
function readConfigFile(fileName: string, readFile: (path: string) => string | undefined): {
|
||||
config?: any;
|
||||
error?: Diagnostic;
|
||||
interface BuildOptions {
|
||||
dry: boolean;
|
||||
force: boolean;
|
||||
verbose: boolean;
|
||||
}
|
||||
enum UpToDateStatusType {
|
||||
Unbuildable = 0,
|
||||
UpToDate = 1,
|
||||
/**
|
||||
* The project appears out of date because its upstream inputs are newer than its outputs,
|
||||
* but all of its outputs are actually newer than the previous identical outputs of its (.d.ts) inputs.
|
||||
* This means we can Pseudo-build (just touch timestamps), as if we had actually built this project.
|
||||
*/
|
||||
UpToDateWithUpstreamTypes = 2,
|
||||
OutputMissing = 3,
|
||||
OutOfDateWithSelf = 4,
|
||||
OutOfDateWithUpstream = 5,
|
||||
UpstreamOutOfDate = 6,
|
||||
UpstreamBlocked = 7,
|
||||
/**
|
||||
* Projects with no outputs (i.e. "solution" files)
|
||||
*/
|
||||
ContainerOnly = 8
|
||||
}
|
||||
type UpToDateStatus = Status.Unbuildable | Status.UpToDate | Status.OutputMissing | Status.OutOfDateWithSelf | Status.OutOfDateWithUpstream | Status.UpstreamOutOfDate | Status.UpstreamBlocked | Status.ContainerOnly;
|
||||
namespace Status {
|
||||
/**
|
||||
* The project can't be built at all in its current state. For example,
|
||||
* its config file cannot be parsed, or it has a syntax error or missing file
|
||||
*/
|
||||
interface Unbuildable {
|
||||
type: UpToDateStatusType.Unbuildable;
|
||||
reason: string;
|
||||
}
|
||||
/**
|
||||
* This project doesn't have any outputs, so "is it up to date" is a meaningless question.
|
||||
*/
|
||||
interface ContainerOnly {
|
||||
type: UpToDateStatusType.ContainerOnly;
|
||||
}
|
||||
/**
|
||||
* The project is up to date with respect to its inputs.
|
||||
* We track what the newest input file is.
|
||||
*/
|
||||
interface UpToDate {
|
||||
type: UpToDateStatusType.UpToDate | UpToDateStatusType.UpToDateWithUpstreamTypes;
|
||||
newestInputFileTime: Date;
|
||||
newestInputFileName: string;
|
||||
newestDeclarationFileContentChangedTime: Date;
|
||||
newestOutputFileTime: Date;
|
||||
newestOutputFileName: string;
|
||||
oldestOutputFileName: string;
|
||||
}
|
||||
/**
|
||||
* One or more of the outputs of the project does not exist.
|
||||
*/
|
||||
interface OutputMissing {
|
||||
type: UpToDateStatusType.OutputMissing;
|
||||
/**
|
||||
* The name of the first output file that didn't exist
|
||||
*/
|
||||
missingOutputFileName: string;
|
||||
}
|
||||
/**
|
||||
* One or more of the project's outputs is older than its newest input.
|
||||
*/
|
||||
interface OutOfDateWithSelf {
|
||||
type: UpToDateStatusType.OutOfDateWithSelf;
|
||||
outOfDateOutputFileName: string;
|
||||
newerInputFileName: string;
|
||||
}
|
||||
/**
|
||||
* This project depends on an out-of-date project, so shouldn't be built yet
|
||||
*/
|
||||
interface UpstreamOutOfDate {
|
||||
type: UpToDateStatusType.UpstreamOutOfDate;
|
||||
upstreamProjectName: string;
|
||||
}
|
||||
/**
|
||||
* This project depends an upstream project with build errors
|
||||
*/
|
||||
interface UpstreamBlocked {
|
||||
type: UpToDateStatusType.UpstreamBlocked;
|
||||
upstreamProjectName: string;
|
||||
}
|
||||
/**
|
||||
* One or more of the project's outputs is older than the newest output of
|
||||
* an upstream project.
|
||||
*/
|
||||
interface OutOfDateWithUpstream {
|
||||
type: UpToDateStatusType.OutOfDateWithUpstream;
|
||||
outOfDateOutputFileName: string;
|
||||
newerProjectName: string;
|
||||
}
|
||||
}
|
||||
interface FileMap<T> {
|
||||
setValue(fileName: string, value: T): void;
|
||||
getValue(fileName: string): T | never;
|
||||
getValueOrUndefined(fileName: string): T | undefined;
|
||||
hasKey(fileName: string): boolean;
|
||||
removeKey(fileName: string): void;
|
||||
getKeys(): string[];
|
||||
}
|
||||
function createDependencyMapper(): {
|
||||
addReference: (childConfigFileName: ResolvedConfigFileName, parentConfigFileName: ResolvedConfigFileName) => void;
|
||||
getReferencesTo: (parentConfigFileName: ResolvedConfigFileName) => ResolvedConfigFileName[];
|
||||
getReferencesOf: (childConfigFileName: ResolvedConfigFileName) => ResolvedConfigFileName[];
|
||||
getKeys: () => ReadonlyArray<ResolvedConfigFileName>;
|
||||
};
|
||||
function createBuildContext(options: BuildOptions): BuildContext;
|
||||
function performBuild(args: string[], compilerHost: CompilerHost, buildHost: BuildHost, system?: System): number | undefined;
|
||||
/**
|
||||
* Parse the text of the tsconfig.json file
|
||||
* @param fileName The path to the config file
|
||||
* @param jsonText The text of the config file
|
||||
* A SolutionBuilder has an immutable set of rootNames that are the "entry point" projects, but
|
||||
* can dynamically add/remove other projects based on changes on the rootNames' references
|
||||
*/
|
||||
function parseConfigFileTextToJson(fileName: string, jsonText: string): {
|
||||
config?: any;
|
||||
error?: Diagnostic;
|
||||
};
|
||||
/**
|
||||
* Read tsconfig.json file
|
||||
* @param fileName The path to the config file
|
||||
*/
|
||||
function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile;
|
||||
/**
|
||||
* Convert the json syntax tree into the json value
|
||||
*/
|
||||
function convertToObject(sourceFile: JsonSourceFile, errors: Push<Diagnostic>): any;
|
||||
/**
|
||||
* Parse the contents of a config file (tsconfig.json).
|
||||
* @param json The contents of the config file to parse
|
||||
* @param host Instance of ParseConfigHost used to enumerate files in folder.
|
||||
* @param basePath A root directory to resolve relative path entries in the config
|
||||
* file to. e.g. outDir
|
||||
*/
|
||||
function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray<FileExtensionInfo>): ParsedCommandLine;
|
||||
/**
|
||||
* Parse the contents of a config file (tsconfig.json).
|
||||
* @param jsonNode The contents of the config file to parse
|
||||
* @param host Instance of ParseConfigHost used to enumerate files in folder.
|
||||
* @param basePath A root directory to resolve relative path entries in the config
|
||||
* file to. e.g. outDir
|
||||
*/
|
||||
function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray<FileExtensionInfo>): ParsedCommandLine;
|
||||
function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
|
||||
options: CompilerOptions;
|
||||
errors: Diagnostic[];
|
||||
};
|
||||
function convertTypeAcquisitionFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
|
||||
options: TypeAcquisition;
|
||||
errors: Diagnostic[];
|
||||
function createSolutionBuilder(compilerHost: CompilerHost, buildHost: BuildHost, rootNames: ReadonlyArray<string>, defaultOptions: BuildOptions, system?: System): {
|
||||
buildAllProjects: () => number;
|
||||
getUpToDateStatus: (project: ParsedCommandLine | undefined) => UpToDateStatus;
|
||||
getUpToDateStatusOfFile: (configFileName: ResolvedConfigFileName) => UpToDateStatus;
|
||||
cleanAllProjects: () => ExitStatus.Success | ExitStatus.DiagnosticsPresent_OutputsSkipped;
|
||||
resetBuildContext: (opts?: BuildOptions) => void;
|
||||
getBuildGraph: (configFileNames: ReadonlyArray<string>) => DependencyGraph | undefined;
|
||||
invalidateProject: (configFileName: string) => void;
|
||||
buildInvalidatedProjects: () => void;
|
||||
buildDependentInvalidatedProjects: () => void;
|
||||
resolveProjectName: (name: string) => ResolvedConfigFileName | undefined;
|
||||
startWatching: () => void;
|
||||
};
|
||||
}
|
||||
declare namespace ts {
|
||||
@@ -5346,5 +5526,5 @@ declare namespace ts {
|
||||
*/
|
||||
function transform<T extends Node>(source: T | T[], transformers: TransformerFactory<T>[], compilerOptions?: CompilerOptions): TransformationResult<T>;
|
||||
}
|
||||
|
||||
export = ts;
|
||||
//# sourceMappingURL=typescriptservices.d.ts.map
|
||||
export = ts
|
||||
+4
-4
@@ -2727,7 +2727,7 @@ var ts;
|
||||
SymbolFlags[SymbolFlags["AliasExcludes"] = 2097152] = "AliasExcludes";
|
||||
SymbolFlags[SymbolFlags["ModuleMember"] = 2623475] = "ModuleMember";
|
||||
SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal";
|
||||
SymbolFlags[SymbolFlags["HasExports"] = 1952] = "HasExports";
|
||||
SymbolFlags[SymbolFlags["HasExports"] = 1955] = "HasExports";
|
||||
SymbolFlags[SymbolFlags["HasMembers"] = 6240] = "HasMembers";
|
||||
SymbolFlags[SymbolFlags["BlockScoped"] = 418] = "BlockScoped";
|
||||
SymbolFlags[SymbolFlags["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor";
|
||||
@@ -25548,7 +25548,7 @@ var ts;
|
||||
symbol.flags |= symbolFlags;
|
||||
node.symbol = symbol;
|
||||
symbol.declarations = ts.append(symbol.declarations, node);
|
||||
if (symbolFlags & 1952 /* HasExports */ && !symbol.exports) {
|
||||
if (symbolFlags & 1955 /* HasExports */ && !symbol.exports) {
|
||||
symbol.exports = ts.createSymbolTable();
|
||||
}
|
||||
if (symbolFlags & 6240 /* HasMembers */ && !symbol.members) {
|
||||
@@ -28917,7 +28917,7 @@ var ts;
|
||||
}
|
||||
var t = getTypeOfSymbol(symbol);
|
||||
visitType(t); // Should handle members on classes and such
|
||||
if (symbol.flags & 1952 /* HasExports */) {
|
||||
if (symbol.flags & 1955 /* HasExports */) {
|
||||
symbol.exports.forEach(visitSymbol);
|
||||
}
|
||||
ts.forEach(symbol.declarations, function (d) {
|
||||
@@ -31215,7 +31215,7 @@ var ts;
|
||||
// The ES6 spec permits export * declarations in a module to circularly reference the module itself. For example,
|
||||
// module 'a' can 'export * from "b"' and 'b' can 'export * from "a"' without error.
|
||||
function visit(symbol) {
|
||||
if (!(symbol && symbol.flags & 1952 /* HasExports */ && ts.pushIfUnique(visitedSymbols, symbol))) {
|
||||
if (!(symbol && symbol.flags & 1955 /* HasExports */ && ts.pushIfUnique(visitedSymbols, symbol))) {
|
||||
return;
|
||||
}
|
||||
var symbols = ts.cloneMap(symbol.exports);
|
||||
|
||||
Vendored
+255
-74
@@ -13,6 +13,12 @@ See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */
|
||||
|
||||
|
||||
declare namespace ts {
|
||||
const versionMajorMinor = "3.0";
|
||||
/** The version of the TypeScript compiler release */
|
||||
const version: string;
|
||||
}
|
||||
declare namespace ts {
|
||||
/**
|
||||
* Type of objects whose values are all of the same type.
|
||||
@@ -22,6 +28,9 @@ declare namespace ts {
|
||||
interface MapLike<T> {
|
||||
[index: string]: T;
|
||||
}
|
||||
interface SortedArray<T> extends Array<T> {
|
||||
" __sortedArrayBrand": any;
|
||||
}
|
||||
/** ES6 Map interface, only read methods included. */
|
||||
interface ReadonlyMap<T> {
|
||||
get(key: string): T | undefined;
|
||||
@@ -52,6 +61,8 @@ declare namespace ts {
|
||||
interface Push<T> {
|
||||
push(...values: T[]): void;
|
||||
}
|
||||
}
|
||||
declare namespace ts {
|
||||
type Path = string & {
|
||||
__pathBrand: any;
|
||||
};
|
||||
@@ -2071,7 +2082,7 @@ declare namespace ts {
|
||||
AliasExcludes = 2097152,
|
||||
ModuleMember = 2623475,
|
||||
ExportHasLocal = 944,
|
||||
HasExports = 1952,
|
||||
HasExports = 1955,
|
||||
HasMembers = 6240,
|
||||
BlockScoped = 418,
|
||||
PropertyOrAccessor = 98308,
|
||||
@@ -2906,9 +2917,6 @@ declare namespace ts {
|
||||
span: TextSpan;
|
||||
newLength: number;
|
||||
}
|
||||
interface SortedArray<T> extends Array<T> {
|
||||
" __sortedArrayBrand": any;
|
||||
}
|
||||
interface SyntaxList extends Node {
|
||||
_children: Node[];
|
||||
}
|
||||
@@ -2978,15 +2986,6 @@ declare namespace ts {
|
||||
IndexSignatureParameters = 4432
|
||||
}
|
||||
}
|
||||
declare namespace ts {
|
||||
const versionMajorMinor = "3.0";
|
||||
/** The version of the TypeScript compiler release */
|
||||
const version: string;
|
||||
}
|
||||
declare namespace ts {
|
||||
function isExternalModuleNameRelative(moduleName: string): boolean;
|
||||
function sortAndDeduplicateDiagnostics<T extends Diagnostic>(diagnostics: ReadonlyArray<T>): T[];
|
||||
}
|
||||
declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
|
||||
declare function clearTimeout(handle: any): void;
|
||||
declare namespace ts {
|
||||
@@ -3099,6 +3098,11 @@ declare namespace ts {
|
||||
function isIdentifierPart(ch: number, languageVersion: ScriptTarget | undefined): boolean;
|
||||
function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, textInitial?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner;
|
||||
}
|
||||
/** Non-internal stuff goes here */
|
||||
declare namespace ts {
|
||||
function isExternalModuleNameRelative(moduleName: string): boolean;
|
||||
function sortAndDeduplicateDiagnostics<T extends Diagnostic>(diagnostics: ReadonlyArray<T>): T[];
|
||||
}
|
||||
declare namespace ts {
|
||||
function getDefaultLibFileName(options: CompilerOptions): string;
|
||||
function textSpanEnd(span: TextSpan): number;
|
||||
@@ -3484,6 +3488,79 @@ declare namespace ts {
|
||||
function isExternalModule(file: SourceFile): boolean;
|
||||
function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
|
||||
}
|
||||
declare namespace ts {
|
||||
function parseCommandLine(commandLine: ReadonlyArray<string>, readFile?: (path: string) => string | undefined): ParsedCommandLine;
|
||||
type DiagnosticReporter = (diagnostic: Diagnostic) => void;
|
||||
/**
|
||||
* Reports config file diagnostics
|
||||
*/
|
||||
interface ConfigFileDiagnosticsReporter {
|
||||
/**
|
||||
* Reports unrecoverable error when parsing config file
|
||||
*/
|
||||
onUnRecoverableConfigFileDiagnostic: DiagnosticReporter;
|
||||
}
|
||||
/**
|
||||
* Interface extending ParseConfigHost to support ParseConfigFile that reads config file and reports errors
|
||||
*/
|
||||
interface ParseConfigFileHost extends ParseConfigHost, ConfigFileDiagnosticsReporter {
|
||||
getCurrentDirectory(): string;
|
||||
}
|
||||
/**
|
||||
* Reads the config file, reports errors if any and exits if the config file cannot be found
|
||||
*/
|
||||
function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions, host: ParseConfigFileHost): ParsedCommandLine | undefined;
|
||||
/**
|
||||
* Read tsconfig.json file
|
||||
* @param fileName The path to the config file
|
||||
*/
|
||||
function readConfigFile(fileName: string, readFile: (path: string) => string | undefined): {
|
||||
config?: any;
|
||||
error?: Diagnostic;
|
||||
};
|
||||
/**
|
||||
* Parse the text of the tsconfig.json file
|
||||
* @param fileName The path to the config file
|
||||
* @param jsonText The text of the config file
|
||||
*/
|
||||
function parseConfigFileTextToJson(fileName: string, jsonText: string): {
|
||||
config?: any;
|
||||
error?: Diagnostic;
|
||||
};
|
||||
/**
|
||||
* Read tsconfig.json file
|
||||
* @param fileName The path to the config file
|
||||
*/
|
||||
function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile;
|
||||
/**
|
||||
* Convert the json syntax tree into the json value
|
||||
*/
|
||||
function convertToObject(sourceFile: JsonSourceFile, errors: Push<Diagnostic>): any;
|
||||
/**
|
||||
* Parse the contents of a config file (tsconfig.json).
|
||||
* @param json The contents of the config file to parse
|
||||
* @param host Instance of ParseConfigHost used to enumerate files in folder.
|
||||
* @param basePath A root directory to resolve relative path entries in the config
|
||||
* file to. e.g. outDir
|
||||
*/
|
||||
function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray<FileExtensionInfo>): ParsedCommandLine;
|
||||
/**
|
||||
* Parse the contents of a config file (tsconfig.json).
|
||||
* @param jsonNode The contents of the config file to parse
|
||||
* @param host Instance of ParseConfigHost used to enumerate files in folder.
|
||||
* @param basePath A root directory to resolve relative path entries in the config
|
||||
* file to. e.g. outDir
|
||||
*/
|
||||
function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray<FileExtensionInfo>): ParsedCommandLine;
|
||||
function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
|
||||
options: CompilerOptions;
|
||||
errors: Diagnostic[];
|
||||
};
|
||||
function convertTypeAcquisitionFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
|
||||
options: TypeAcquisition;
|
||||
errors: Diagnostic[];
|
||||
};
|
||||
}
|
||||
declare namespace ts {
|
||||
function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined;
|
||||
/**
|
||||
@@ -4311,76 +4388,179 @@ declare namespace ts {
|
||||
function createWatchProgram<T extends BuilderProgram>(host: WatchCompilerHostOfConfigFile<T>): WatchOfConfigFile<T>;
|
||||
}
|
||||
declare namespace ts {
|
||||
function parseCommandLine(commandLine: ReadonlyArray<string>, readFile?: (path: string) => string | undefined): ParsedCommandLine;
|
||||
type DiagnosticReporter = (diagnostic: Diagnostic) => void;
|
||||
/**
|
||||
* Reports config file diagnostics
|
||||
* Branded string for keeping track of when we've turned an ambiguous path
|
||||
* specified like "./blah" to an absolute path to an actual
|
||||
* tsconfig file, e.g. "/root/blah/tsconfig.json"
|
||||
*/
|
||||
interface ConfigFileDiagnosticsReporter {
|
||||
type ResolvedConfigFileName = string & {
|
||||
_isResolvedConfigFileName: never;
|
||||
};
|
||||
interface BuildHost {
|
||||
verbose(diag: DiagnosticMessage, ...args: string[]): void;
|
||||
error(diag: DiagnosticMessage, ...args: string[]): void;
|
||||
errorDiagnostic(diag: Diagnostic): void;
|
||||
message(diag: DiagnosticMessage, ...args: string[]): void;
|
||||
}
|
||||
/**
|
||||
* A BuildContext tracks what's going on during the course of a build.
|
||||
*
|
||||
* Callers may invoke any number of build requests within the same context;
|
||||
* until the context is reset, each project will only be built at most once.
|
||||
*
|
||||
* Example: In a standard setup where project B depends on project A, and both are out of date,
|
||||
* a failed build of A will result in A remaining out of date. When we try to build
|
||||
* B, we should immediately bail instead of recomputing A's up-to-date status again.
|
||||
*
|
||||
* This also matters for performing fast (i.e. fake) downstream builds of projects
|
||||
* when their upstream .d.ts files haven't changed content (but have newer timestamps)
|
||||
*/
|
||||
interface BuildContext {
|
||||
options: BuildOptions;
|
||||
/**
|
||||
* Reports unrecoverable error when parsing config file
|
||||
* Map from output file name to its pre-build timestamp
|
||||
*/
|
||||
onUnRecoverableConfigFileDiagnostic: DiagnosticReporter;
|
||||
unchangedOutputs: FileMap<Date>;
|
||||
/**
|
||||
* Map from config file name to up-to-date status
|
||||
*/
|
||||
projectStatus: FileMap<UpToDateStatus>;
|
||||
invalidatedProjects: FileMap<true>;
|
||||
queuedProjects: FileMap<true>;
|
||||
missingRoots: Map<true>;
|
||||
}
|
||||
/**
|
||||
* Interface extending ParseConfigHost to support ParseConfigFile that reads config file and reports errors
|
||||
*/
|
||||
interface ParseConfigFileHost extends ParseConfigHost, ConfigFileDiagnosticsReporter {
|
||||
getCurrentDirectory(): string;
|
||||
type Mapper = ReturnType<typeof createDependencyMapper>;
|
||||
interface DependencyGraph {
|
||||
buildQueue: ResolvedConfigFileName[];
|
||||
dependencyMap: Mapper;
|
||||
}
|
||||
/**
|
||||
* Reads the config file, reports errors if any and exits if the config file cannot be found
|
||||
*/
|
||||
function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions, host: ParseConfigFileHost): ParsedCommandLine | undefined;
|
||||
/**
|
||||
* Read tsconfig.json file
|
||||
* @param fileName The path to the config file
|
||||
*/
|
||||
function readConfigFile(fileName: string, readFile: (path: string) => string | undefined): {
|
||||
config?: any;
|
||||
error?: Diagnostic;
|
||||
interface BuildOptions {
|
||||
dry: boolean;
|
||||
force: boolean;
|
||||
verbose: boolean;
|
||||
}
|
||||
enum UpToDateStatusType {
|
||||
Unbuildable = 0,
|
||||
UpToDate = 1,
|
||||
/**
|
||||
* The project appears out of date because its upstream inputs are newer than its outputs,
|
||||
* but all of its outputs are actually newer than the previous identical outputs of its (.d.ts) inputs.
|
||||
* This means we can Pseudo-build (just touch timestamps), as if we had actually built this project.
|
||||
*/
|
||||
UpToDateWithUpstreamTypes = 2,
|
||||
OutputMissing = 3,
|
||||
OutOfDateWithSelf = 4,
|
||||
OutOfDateWithUpstream = 5,
|
||||
UpstreamOutOfDate = 6,
|
||||
UpstreamBlocked = 7,
|
||||
/**
|
||||
* Projects with no outputs (i.e. "solution" files)
|
||||
*/
|
||||
ContainerOnly = 8
|
||||
}
|
||||
type UpToDateStatus = Status.Unbuildable | Status.UpToDate | Status.OutputMissing | Status.OutOfDateWithSelf | Status.OutOfDateWithUpstream | Status.UpstreamOutOfDate | Status.UpstreamBlocked | Status.ContainerOnly;
|
||||
namespace Status {
|
||||
/**
|
||||
* The project can't be built at all in its current state. For example,
|
||||
* its config file cannot be parsed, or it has a syntax error or missing file
|
||||
*/
|
||||
interface Unbuildable {
|
||||
type: UpToDateStatusType.Unbuildable;
|
||||
reason: string;
|
||||
}
|
||||
/**
|
||||
* This project doesn't have any outputs, so "is it up to date" is a meaningless question.
|
||||
*/
|
||||
interface ContainerOnly {
|
||||
type: UpToDateStatusType.ContainerOnly;
|
||||
}
|
||||
/**
|
||||
* The project is up to date with respect to its inputs.
|
||||
* We track what the newest input file is.
|
||||
*/
|
||||
interface UpToDate {
|
||||
type: UpToDateStatusType.UpToDate | UpToDateStatusType.UpToDateWithUpstreamTypes;
|
||||
newestInputFileTime: Date;
|
||||
newestInputFileName: string;
|
||||
newestDeclarationFileContentChangedTime: Date;
|
||||
newestOutputFileTime: Date;
|
||||
newestOutputFileName: string;
|
||||
oldestOutputFileName: string;
|
||||
}
|
||||
/**
|
||||
* One or more of the outputs of the project does not exist.
|
||||
*/
|
||||
interface OutputMissing {
|
||||
type: UpToDateStatusType.OutputMissing;
|
||||
/**
|
||||
* The name of the first output file that didn't exist
|
||||
*/
|
||||
missingOutputFileName: string;
|
||||
}
|
||||
/**
|
||||
* One or more of the project's outputs is older than its newest input.
|
||||
*/
|
||||
interface OutOfDateWithSelf {
|
||||
type: UpToDateStatusType.OutOfDateWithSelf;
|
||||
outOfDateOutputFileName: string;
|
||||
newerInputFileName: string;
|
||||
}
|
||||
/**
|
||||
* This project depends on an out-of-date project, so shouldn't be built yet
|
||||
*/
|
||||
interface UpstreamOutOfDate {
|
||||
type: UpToDateStatusType.UpstreamOutOfDate;
|
||||
upstreamProjectName: string;
|
||||
}
|
||||
/**
|
||||
* This project depends an upstream project with build errors
|
||||
*/
|
||||
interface UpstreamBlocked {
|
||||
type: UpToDateStatusType.UpstreamBlocked;
|
||||
upstreamProjectName: string;
|
||||
}
|
||||
/**
|
||||
* One or more of the project's outputs is older than the newest output of
|
||||
* an upstream project.
|
||||
*/
|
||||
interface OutOfDateWithUpstream {
|
||||
type: UpToDateStatusType.OutOfDateWithUpstream;
|
||||
outOfDateOutputFileName: string;
|
||||
newerProjectName: string;
|
||||
}
|
||||
}
|
||||
interface FileMap<T> {
|
||||
setValue(fileName: string, value: T): void;
|
||||
getValue(fileName: string): T | never;
|
||||
getValueOrUndefined(fileName: string): T | undefined;
|
||||
hasKey(fileName: string): boolean;
|
||||
removeKey(fileName: string): void;
|
||||
getKeys(): string[];
|
||||
}
|
||||
function createDependencyMapper(): {
|
||||
addReference: (childConfigFileName: ResolvedConfigFileName, parentConfigFileName: ResolvedConfigFileName) => void;
|
||||
getReferencesTo: (parentConfigFileName: ResolvedConfigFileName) => ResolvedConfigFileName[];
|
||||
getReferencesOf: (childConfigFileName: ResolvedConfigFileName) => ResolvedConfigFileName[];
|
||||
getKeys: () => ReadonlyArray<ResolvedConfigFileName>;
|
||||
};
|
||||
function createBuildContext(options: BuildOptions): BuildContext;
|
||||
function performBuild(args: string[], compilerHost: CompilerHost, buildHost: BuildHost, system?: System): number | undefined;
|
||||
/**
|
||||
* Parse the text of the tsconfig.json file
|
||||
* @param fileName The path to the config file
|
||||
* @param jsonText The text of the config file
|
||||
* A SolutionBuilder has an immutable set of rootNames that are the "entry point" projects, but
|
||||
* can dynamically add/remove other projects based on changes on the rootNames' references
|
||||
*/
|
||||
function parseConfigFileTextToJson(fileName: string, jsonText: string): {
|
||||
config?: any;
|
||||
error?: Diagnostic;
|
||||
};
|
||||
/**
|
||||
* Read tsconfig.json file
|
||||
* @param fileName The path to the config file
|
||||
*/
|
||||
function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile;
|
||||
/**
|
||||
* Convert the json syntax tree into the json value
|
||||
*/
|
||||
function convertToObject(sourceFile: JsonSourceFile, errors: Push<Diagnostic>): any;
|
||||
/**
|
||||
* Parse the contents of a config file (tsconfig.json).
|
||||
* @param json The contents of the config file to parse
|
||||
* @param host Instance of ParseConfigHost used to enumerate files in folder.
|
||||
* @param basePath A root directory to resolve relative path entries in the config
|
||||
* file to. e.g. outDir
|
||||
*/
|
||||
function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray<FileExtensionInfo>): ParsedCommandLine;
|
||||
/**
|
||||
* Parse the contents of a config file (tsconfig.json).
|
||||
* @param jsonNode The contents of the config file to parse
|
||||
* @param host Instance of ParseConfigHost used to enumerate files in folder.
|
||||
* @param basePath A root directory to resolve relative path entries in the config
|
||||
* file to. e.g. outDir
|
||||
*/
|
||||
function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray<FileExtensionInfo>): ParsedCommandLine;
|
||||
function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
|
||||
options: CompilerOptions;
|
||||
errors: Diagnostic[];
|
||||
};
|
||||
function convertTypeAcquisitionFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
|
||||
options: TypeAcquisition;
|
||||
errors: Diagnostic[];
|
||||
function createSolutionBuilder(compilerHost: CompilerHost, buildHost: BuildHost, rootNames: ReadonlyArray<string>, defaultOptions: BuildOptions, system?: System): {
|
||||
buildAllProjects: () => number;
|
||||
getUpToDateStatus: (project: ParsedCommandLine | undefined) => UpToDateStatus;
|
||||
getUpToDateStatusOfFile: (configFileName: ResolvedConfigFileName) => UpToDateStatus;
|
||||
cleanAllProjects: () => ExitStatus.Success | ExitStatus.DiagnosticsPresent_OutputsSkipped;
|
||||
resetBuildContext: (opts?: BuildOptions) => void;
|
||||
getBuildGraph: (configFileNames: ReadonlyArray<string>) => DependencyGraph | undefined;
|
||||
invalidateProject: (configFileName: string) => void;
|
||||
buildInvalidatedProjects: () => void;
|
||||
buildDependentInvalidatedProjects: () => void;
|
||||
resolveProjectName: (name: string) => ResolvedConfigFileName | undefined;
|
||||
startWatching: () => void;
|
||||
};
|
||||
}
|
||||
declare namespace ts {
|
||||
@@ -5346,3 +5526,4 @@ declare namespace ts {
|
||||
*/
|
||||
function transform<T extends Node>(source: T | T[], transformers: TransformerFactory<T>[], compilerOptions?: CompilerOptions): TransformationResult<T>;
|
||||
}
|
||||
//# sourceMappingURL=typescriptservices.d.ts.map
|
||||
@@ -2727,7 +2727,7 @@ var ts;
|
||||
SymbolFlags[SymbolFlags["AliasExcludes"] = 2097152] = "AliasExcludes";
|
||||
SymbolFlags[SymbolFlags["ModuleMember"] = 2623475] = "ModuleMember";
|
||||
SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal";
|
||||
SymbolFlags[SymbolFlags["HasExports"] = 1952] = "HasExports";
|
||||
SymbolFlags[SymbolFlags["HasExports"] = 1955] = "HasExports";
|
||||
SymbolFlags[SymbolFlags["HasMembers"] = 6240] = "HasMembers";
|
||||
SymbolFlags[SymbolFlags["BlockScoped"] = 418] = "BlockScoped";
|
||||
SymbolFlags[SymbolFlags["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor";
|
||||
@@ -25548,7 +25548,7 @@ var ts;
|
||||
symbol.flags |= symbolFlags;
|
||||
node.symbol = symbol;
|
||||
symbol.declarations = ts.append(symbol.declarations, node);
|
||||
if (symbolFlags & 1952 /* HasExports */ && !symbol.exports) {
|
||||
if (symbolFlags & 1955 /* HasExports */ && !symbol.exports) {
|
||||
symbol.exports = ts.createSymbolTable();
|
||||
}
|
||||
if (symbolFlags & 6240 /* HasMembers */ && !symbol.members) {
|
||||
@@ -28917,7 +28917,7 @@ var ts;
|
||||
}
|
||||
var t = getTypeOfSymbol(symbol);
|
||||
visitType(t); // Should handle members on classes and such
|
||||
if (symbol.flags & 1952 /* HasExports */) {
|
||||
if (symbol.flags & 1955 /* HasExports */) {
|
||||
symbol.exports.forEach(visitSymbol);
|
||||
}
|
||||
ts.forEach(symbol.declarations, function (d) {
|
||||
@@ -31215,7 +31215,7 @@ var ts;
|
||||
// The ES6 spec permits export * declarations in a module to circularly reference the module itself. For example,
|
||||
// module 'a' can 'export * from "b"' and 'b' can 'export * from "a"' without error.
|
||||
function visit(symbol) {
|
||||
if (!(symbol && symbol.flags & 1952 /* HasExports */ && ts.pushIfUnique(visitedSymbols, symbol))) {
|
||||
if (!(symbol && symbol.flags & 1955 /* HasExports */ && ts.pushIfUnique(visitedSymbols, symbol))) {
|
||||
return;
|
||||
}
|
||||
var symbols = ts.cloneMap(symbol.exports);
|
||||
|
||||
+61097
-172
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,19 @@
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */
|
||||
|
||||
|
||||
"use strict";
|
||||
if (process.argv.length < 3) {
|
||||
process.exit(1);
|
||||
|
||||
Reference in New Issue
Block a user