@typescript-deploys/pr-build 5.6.0-pr-58296-32 → 5.6.0-pr-59352-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/tsc.js CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.6";
21
- var version = `${versionMajorMinor}.0-insiders.20240718`;
21
+ var version = `${versionMajorMinor}.0-insiders.20240719`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -6799,8 +6799,6 @@ var Diagnostics = {
6799
6799
  Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
6800
6800
  Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given: diag(4125, 1 /* Error */, "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125", "Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),
6801
6801
  One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value: diag(4126, 1 /* Error */, "One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126", "One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),
6802
- Property_0_is_readonly_in_the_source_but_not_in_the_target: diag(4127, 1 /* Error */, "Property_0_is_readonly_in_the_source_but_not_in_the_target_4127", "Property '{0}' is 'readonly' in the source but not in the target."),
6803
- _0_index_signature_is_readonly_in_the_source_but_not_in_the_target: diag(4128, 1 /* Error */, "_0_index_signature_is_readonly_in_the_source_but_not_in_the_target_4128", "'{0}' index signature is 'readonly' in the source but not in the target."),
6804
6802
  The_current_host_does_not_support_the_0_option: diag(5001, 1 /* Error */, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
6805
6803
  Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1 /* Error */, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
6806
6804
  File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1 /* Error */, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
@@ -7367,7 +7365,6 @@ var Diagnostics = {
7367
7365
  Require_undeclared_properties_from_index_signatures_to_use_element_accesses: diag(6717, 3 /* Message */, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", "Require undeclared properties from index signatures to use element accesses."),
7368
7366
  Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, 3 /* Message */, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types."),
7369
7367
  Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files: diag(6719, 3 /* Message */, "Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719", "Require sufficient annotation on exports so other tools can trivially generate declaration files."),
7370
- Ensure_that_readonly_properties_remain_read_only_in_type_relationships: diag(6720, 3 /* Message */, "Ensure_that_readonly_properties_remain_read_only_in_type_relationships_6720", "Ensure that 'readonly' properties remain read-only in type relationships."),
7371
7368
  Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, 3 /* Message */, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."),
7372
7369
  Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting: diag(6804, 3 /* Message */, "Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804", "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),
7373
7370
  Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported: diag(6805, 3 /* Message */, "Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805", "Disable full type checking (only critical parse and emit errors will be reported)."),
@@ -36364,15 +36361,6 @@ var commandOptionsWithoutBuild = [
36364
36361
  description: Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
36365
36362
  defaultValueDescription: false
36366
36363
  },
36367
- {
36368
- name: "enforceReadonly",
36369
- type: "boolean",
36370
- affectsSemanticDiagnostics: true,
36371
- affectsBuildInfo: true,
36372
- category: Diagnostics.Type_Checking,
36373
- description: Diagnostics.Ensure_that_readonly_properties_remain_read_only_in_type_relationships,
36374
- defaultValueDescription: false
36375
- },
36376
36364
  // Module Resolution
36377
36365
  {
36378
36366
  name: "moduleResolution",
@@ -45298,7 +45286,6 @@ function createTypeChecker(host) {
45298
45286
  var noImplicitThis = getStrictOptionValue(compilerOptions, "noImplicitThis");
45299
45287
  var useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
45300
45288
  var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes;
45301
- var enforceReadonly = compilerOptions.enforceReadonly;
45302
45289
  var checkBinaryExpression = createCheckBinaryExpression();
45303
45290
  var emitResolver = createResolver();
45304
45291
  var nodeBuilder = createNodeBuilder();
@@ -56833,20 +56820,20 @@ function createTypeChecker(host) {
56833
56820
  const declaration = type.declaration;
56834
56821
  return (declaration.readonlyToken ? declaration.readonlyToken.kind === 41 /* MinusToken */ ? 2 /* ExcludeReadonly */ : 1 /* IncludeReadonly */ : 0) | (declaration.questionToken ? declaration.questionToken.kind === 41 /* MinusToken */ ? 8 /* ExcludeOptional */ : 4 /* IncludeOptional */ : 0);
56835
56822
  }
56836
- function getEffectiveMappedTypeModifiers(type, mask) {
56823
+ function getMappedTypeOptionality(type) {
56824
+ const modifiers = getMappedTypeModifiers(type);
56825
+ return modifiers & 8 /* ExcludeOptional */ ? -1 : modifiers & 4 /* IncludeOptional */ ? 1 : 0;
56826
+ }
56827
+ function getCombinedMappedTypeOptionality(type) {
56837
56828
  if (getObjectFlags(type) & 32 /* Mapped */) {
56838
- return getMappedTypeModifiers(type) & mask || getEffectiveMappedTypeModifiers(getModifiersTypeFromMappedType(type), mask);
56829
+ return getMappedTypeOptionality(type) || getCombinedMappedTypeOptionality(getModifiersTypeFromMappedType(type));
56839
56830
  }
56840
56831
  if (type.flags & 2097152 /* Intersection */) {
56841
- const modifiers = getEffectiveMappedTypeModifiers(type.types[0], mask);
56842
- return every(type.types, (t, i) => i === 0 || getEffectiveMappedTypeModifiers(t, mask) === modifiers) ? modifiers : 0;
56832
+ const optionality = getCombinedMappedTypeOptionality(type.types[0]);
56833
+ return every(type.types, (t, i) => i === 0 || getCombinedMappedTypeOptionality(t) === optionality) ? optionality : 0;
56843
56834
  }
56844
56835
  return 0;
56845
56836
  }
56846
- function getMappedTypeModifiersRank(type, mask) {
56847
- const modifiers = getEffectiveMappedTypeModifiers(type, mask);
56848
- return modifiers & 10 /* Exclude */ ? -1 : modifiers & 5 /* Include */ ? 1 : 0;
56849
- }
56850
56837
  function isPartialMappedType(type) {
56851
56838
  return !!(getObjectFlags(type) & 32 /* Mapped */ && getMappedTypeModifiers(type) & 4 /* IncludeOptional */);
56852
56839
  }
@@ -60652,12 +60639,12 @@ function createTypeChecker(host) {
60652
60639
  const mapper = createTypeMapper([getTypeParameterFromMappedType(objectType)], [index]);
60653
60640
  const templateMapper = combineTypeMappers(objectType.mapper, mapper);
60654
60641
  const instantiatedTemplateType = instantiateType(getTemplateTypeFromMappedType(objectType.target || objectType), templateMapper);
60655
- const isOptional = getMappedTypeModifiers(objectType) & 4 /* IncludeOptional */ || (isGenericType(objectType) ? getEffectiveMappedTypeModifiers(getModifiersTypeFromMappedType(objectType), 12 /* Optional */) & 4 /* IncludeOptional */ : couldAccessOptionalProperty(objectType, index));
60642
+ const isOptional = getMappedTypeOptionality(objectType) > 0 || (isGenericType(objectType) ? getCombinedMappedTypeOptionality(getModifiersTypeFromMappedType(objectType)) > 0 : couldAccessOptionalProperty(objectType, index));
60656
60643
  return addOptionality(
60657
60644
  instantiatedTemplateType,
60658
60645
  /*isProperty*/
60659
60646
  true,
60660
- !!isOptional
60647
+ isOptional
60661
60648
  );
60662
60649
  }
60663
60650
  function couldAccessOptionalProperty(objectType, indexType) {
@@ -64155,7 +64142,7 @@ function createTypeChecker(host) {
64155
64142
  }
64156
64143
  if (targetFlags & 262144 /* TypeParameter */) {
64157
64144
  if (getObjectFlags(source2) & 32 /* Mapped */ && !source2.declaration.nameType && isRelatedTo(getIndexType(target2), getConstraintTypeFromMappedType(source2), 3 /* Both */)) {
64158
- if (!(getMappedTypeModifiers(source2) & 4 /* IncludeOptional */) && !(enforceReadonly && relation !== comparableRelation && getMappedTypeModifiers(source2) & 1 /* IncludeReadonly */)) {
64145
+ if (!(getMappedTypeModifiers(source2) & 4 /* IncludeOptional */)) {
64159
64146
  const templateType = getTemplateTypeFromMappedType(source2);
64160
64147
  const indexedAccessType = getIndexedAccessType(target2, getTypeParameterFromMappedType(source2));
64161
64148
  if (result2 = isRelatedTo(templateType, indexedAccessType, 3 /* Both */, reportErrors2)) {
@@ -64267,7 +64254,7 @@ function createTypeChecker(host) {
64267
64254
  const keysRemapped = !!target2.declaration.nameType;
64268
64255
  const templateType = getTemplateTypeFromMappedType(target2);
64269
64256
  const modifiers = getMappedTypeModifiers(target2);
64270
- if (!(modifiers & 8 /* ExcludeOptional */) && !(enforceReadonly && relation !== comparableRelation && modifiers & 2 /* ExcludeReadonly */)) {
64257
+ if (!(modifiers & 8 /* ExcludeOptional */)) {
64271
64258
  if (!keysRemapped && templateType.flags & 8388608 /* IndexedAccess */ && templateType.objectType === source2 && templateType.indexType === getTypeParameterFromMappedType(target2)) {
64272
64259
  return -1 /* True */;
64273
64260
  }
@@ -64564,11 +64551,11 @@ function createTypeChecker(host) {
64564
64551
  }
64565
64552
  }
64566
64553
  function mappedTypeRelatedTo(source2, target2, reportErrors2) {
64567
- const modifiersRelated = relation === comparableRelation || (relation === identityRelation ? getMappedTypeModifiers(source2) === getMappedTypeModifiers(target2) : getMappedTypeModifiersRank(source2, 12 /* Optional */) <= getMappedTypeModifiersRank(target2, 12 /* Optional */) && (!enforceReadonly || relation === comparableRelation || getMappedTypeModifiersRank(source2, 3 /* Readonly */) <= getMappedTypeModifiersRank(target2, 3 /* Readonly */)));
64554
+ const modifiersRelated = relation === comparableRelation || (relation === identityRelation ? getMappedTypeModifiers(source2) === getMappedTypeModifiers(target2) : getCombinedMappedTypeOptionality(source2) <= getCombinedMappedTypeOptionality(target2));
64568
64555
  if (modifiersRelated) {
64569
64556
  let result2;
64570
64557
  const targetConstraint = getConstraintTypeFromMappedType(target2);
64571
- const sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source2), getEffectiveMappedTypeModifiers(source2, 12 /* Optional */) & 8 /* ExcludeOptional */ ? reportUnmeasurableMapper : reportUnreliableMapper);
64558
+ const sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source2), getCombinedMappedTypeOptionality(source2) < 0 ? reportUnmeasurableMapper : reportUnreliableMapper);
64572
64559
  if (result2 = isRelatedTo(targetConstraint, sourceConstraint, 3 /* Both */, reportErrors2)) {
64573
64560
  const mapper = createTypeMapper([getTypeParameterFromMappedType(source2)], [getTypeParameterFromMappedType(target2)]);
64574
64561
  if (instantiateType(getNameTypeFromMappedType(source2), mapper) === instantiateType(getNameTypeFromMappedType(target2), mapper)) {
@@ -64742,10 +64729,7 @@ function createTypeChecker(host) {
64742
64729
  }
64743
64730
  return 0 /* False */;
64744
64731
  }
64745
- if ((relation === strictSubtypeRelation || enforceReadonly && relation !== comparableRelation) && isReadonlySymbol(sourceProp) && !isReadonlySymbol(targetProp) && !(targetProp.flags & 8192 /* Method */)) {
64746
- if (reportErrors2) {
64747
- reportError(Diagnostics.Property_0_is_readonly_in_the_source_but_not_in_the_target, symbolToString(targetProp));
64748
- }
64732
+ if (relation === strictSubtypeRelation && isReadonlySymbol(sourceProp) && !isReadonlySymbol(targetProp)) {
64749
64733
  return 0 /* False */;
64750
64734
  }
64751
64735
  const related = isPropertySymbolTypeRelated(sourceProp, targetProp, getTypeOfSourceProperty, reportErrors2, intersectionState);
@@ -65213,21 +65197,12 @@ function createTypeChecker(host) {
65213
65197
  void 0,
65214
65198
  intersectionState
65215
65199
  );
65216
- if (!related) {
65217
- if (reportErrors2) {
65218
- if (sourceInfo.keyType === targetInfo.keyType) {
65219
- reportError(Diagnostics._0_index_signatures_are_incompatible, typeToString(sourceInfo.keyType));
65220
- } else {
65221
- reportError(Diagnostics._0_and_1_index_signatures_are_incompatible, typeToString(sourceInfo.keyType), typeToString(targetInfo.keyType));
65222
- }
65223
- }
65224
- return 0 /* False */;
65225
- }
65226
- if (enforceReadonly && relation !== comparableRelation && sourceInfo.isReadonly && !targetInfo.isReadonly) {
65227
- if (reportErrors2) {
65228
- reportError(Diagnostics._0_index_signature_is_readonly_in_the_source_but_not_in_the_target, typeToString(sourceInfo.keyType));
65200
+ if (!related && reportErrors2) {
65201
+ if (sourceInfo.keyType === targetInfo.keyType) {
65202
+ reportError(Diagnostics._0_index_signatures_are_incompatible, typeToString(sourceInfo.keyType));
65203
+ } else {
65204
+ reportError(Diagnostics._0_and_1_index_signatures_are_incompatible, typeToString(sourceInfo.keyType), typeToString(targetInfo.keyType));
65229
65205
  }
65230
- return 0 /* False */;
65231
65206
  }
65232
65207
  return related;
65233
65208
  }
@@ -67821,6 +67796,9 @@ function createTypeChecker(host) {
67821
67796
  function recombineUnknownType(type) {
67822
67797
  return type === unknownUnionType ? unknownType : type;
67823
67798
  }
67799
+ function getUnknownIfMaybeUnknown(type) {
67800
+ return strictNullChecks && type.flags & 465829888 /* Instantiable */ ? getBaseConstraintOfType(type) || unknownType : type;
67801
+ }
67824
67802
  function getTypeWithDefault(type, defaultExpression) {
67825
67803
  return defaultExpression ? getUnionType([getNonUndefinedType(type), getTypeOfExpression(defaultExpression)]) : type;
67826
67804
  }
@@ -71083,9 +71061,10 @@ function createTypeChecker(host) {
71083
71061
  (t) => {
71084
71062
  var _a;
71085
71063
  if (isGenericMappedType(t) && !t.declaration.nameType) {
71086
- const constraint = getBaseConstraintOrType(getConstraintTypeFromMappedType(t));
71064
+ const constraint = getConstraintTypeFromMappedType(t);
71065
+ const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
71087
71066
  const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
71088
- if (isTypeAssignableTo(propertyNameType, constraint)) {
71067
+ if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
71089
71068
  return substituteIndexedMappedType(t, propertyNameType);
71090
71069
  }
71091
71070
  } else if (t.flags & 3670016 /* StructuredType */) {
@@ -71135,17 +71114,23 @@ function createTypeChecker(host) {
71135
71114
  const symbol = getSymbolOfDeclaration(element);
71136
71115
  return getTypeOfPropertyOfContextualType(type, symbol.escapedName, getSymbolLinks(symbol).nameType);
71137
71116
  }
71138
- const name = getNameOfDeclaration(element);
71139
- if (name && isComputedPropertyName(name)) {
71140
- const exprType = checkExpression(name.expression);
71141
- if (isTypeUsableAsPropertyName(exprType)) {
71142
- return getTypeOfPropertyOfContextualType(type, getPropertyNameFromType(exprType), exprType);
71117
+ if (hasDynamicName(element)) {
71118
+ const name = getNameOfDeclaration(element);
71119
+ if (name && isComputedPropertyName(name)) {
71120
+ const exprType = checkExpression(name.expression);
71121
+ const propType = isTypeUsableAsPropertyName(exprType) && getTypeOfPropertyOfContextualType(type, getPropertyNameFromType(exprType));
71122
+ if (propType) {
71123
+ return propType;
71124
+ }
71143
71125
  }
71126
+ }
71127
+ if (element.name) {
71128
+ const nameType = getLiteralTypeFromPropertyName(element.name);
71144
71129
  return mapType(
71145
71130
  type,
71146
71131
  (t) => {
71147
71132
  var _a;
71148
- return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), exprType)) == null ? void 0 : _a.type;
71133
+ return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType)) == null ? void 0 : _a.type;
71149
71134
  },
71150
71135
  /*noReductions*/
71151
71136
  true
@@ -71154,20 +71139,6 @@ function createTypeChecker(host) {
71154
71139
  }
71155
71140
  return void 0;
71156
71141
  }
71157
- function isContextualPropertyMutable(type, name, nameType) {
71158
- return someType(type, (t) => {
71159
- const propName = nameType ? isTypeUsableAsPropertyName(nameType) ? getPropertyNameFromType(nameType) : void 0 : name;
71160
- const prop = propName && getPropertyOfType(t, propName);
71161
- if (prop) {
71162
- return !isReadonlySymbol(prop);
71163
- }
71164
- const indexInfo = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)));
71165
- if (indexInfo) {
71166
- return !indexInfo.isReadonly;
71167
- }
71168
- return false;
71169
- });
71170
- }
71171
71142
  function getSpreadIndices(elements) {
71172
71143
  let first2, last2;
71173
71144
  for (let i = 0; i < elements.length; i++) {
@@ -72013,6 +71984,7 @@ function createTypeChecker(host) {
72013
71984
  );
72014
71985
  const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 206 /* ObjectBindingPattern */ || contextualType.pattern.kind === 210 /* ObjectLiteralExpression */);
72015
71986
  const inConstContext = isConstContext(node);
71987
+ const checkFlags = inConstContext ? 8 /* Readonly */ : 0;
72016
71988
  const isInJavascript = isInJSFile(node) && !isInJsonFile(node);
72017
71989
  const enumTag = isInJavascript ? getJSDocEnumTag(node) : void 0;
72018
71990
  const isJSObjectLiteral = !contextualType && isInJavascript && !enumTag;
@@ -72048,7 +72020,6 @@ function createTypeChecker(host) {
72048
72020
  }
72049
72021
  objectFlags |= getObjectFlags(type) & 458752 /* PropagatingFlags */;
72050
72022
  const nameType = computedNameType && isTypeUsableAsPropertyName(computedNameType) ? computedNameType : void 0;
72051
- const checkFlags = inConstContext && !(enforceReadonly && contextualType && isContextualPropertyMutable(contextualType, member.escapedName, nameType)) ? 8 /* Readonly */ : 0;
72052
72023
  const prop = nameType ? createSymbol(4 /* Property */ | member.flags, getPropertyNameFromType(nameType), checkFlags | 4096 /* Late */) : createSymbol(4 /* Property */ | member.flags, member.escapedName, checkFlags);
72053
72024
  if (nameType) {
72054
72025
  prop.links.nameType = nameType;
@@ -77896,8 +77867,8 @@ function createTypeChecker(host) {
77896
77867
  case 33 /* LessThanEqualsToken */:
77897
77868
  case 34 /* GreaterThanEqualsToken */:
77898
77869
  if (checkForDisallowedESSymbolOperand(operator)) {
77899
- leftType = getBaseTypeOfLiteralTypeForComparison(checkNonNullType(leftType, left));
77900
- rightType = getBaseTypeOfLiteralTypeForComparison(checkNonNullType(rightType, right));
77870
+ leftType = getBaseTypeOfLiteralTypeForComparison(checkNonNullType(getUnknownIfMaybeUnknown(leftType), left));
77871
+ rightType = getBaseTypeOfLiteralTypeForComparison(checkNonNullType(getUnknownIfMaybeUnknown(rightType), right));
77901
77872
  reportOperatorErrorUnless((left2, right2) => {
77902
77873
  if (isTypeAny(left2) || isTypeAny(right2)) {
77903
77874
  return true;
@@ -705,13 +705,13 @@ declare namespace ts {
705
705
  command: CommandTypes.Definition;
706
706
  }
707
707
  export interface DefinitionAndBoundSpanRequest extends FileLocationRequest {
708
- command: CommandTypes.DefinitionAndBoundSpan;
708
+ readonly command: CommandTypes.DefinitionAndBoundSpan;
709
709
  }
710
710
  export interface FindSourceDefinitionRequest extends FileLocationRequest {
711
- command: CommandTypes.FindSourceDefinition;
711
+ readonly command: CommandTypes.FindSourceDefinition;
712
712
  }
713
713
  export interface DefinitionAndBoundSpanResponse extends Response {
714
- body: DefinitionInfoAndBoundSpan;
714
+ readonly body: DefinitionInfoAndBoundSpan;
715
715
  }
716
716
  /**
717
717
  * Go to type request; value of command field is
@@ -823,23 +823,23 @@ declare namespace ts {
823
823
  openingBrace: string;
824
824
  }
825
825
  export interface JsxClosingTagRequest extends FileLocationRequest {
826
- command: CommandTypes.JsxClosingTag;
827
- arguments: JsxClosingTagRequestArgs;
826
+ readonly command: CommandTypes.JsxClosingTag;
827
+ readonly arguments: JsxClosingTagRequestArgs;
828
828
  }
829
829
  export interface JsxClosingTagRequestArgs extends FileLocationRequestArgs {
830
830
  }
831
831
  export interface JsxClosingTagResponse extends Response {
832
- body: TextInsertion;
832
+ readonly body: TextInsertion;
833
833
  }
834
834
  export interface LinkedEditingRangeRequest extends FileLocationRequest {
835
- command: CommandTypes.LinkedEditingRange;
835
+ readonly command: CommandTypes.LinkedEditingRange;
836
836
  }
837
837
  export interface LinkedEditingRangesBody {
838
838
  ranges: TextSpan[];
839
839
  wordPattern?: string;
840
840
  }
841
841
  export interface LinkedEditingRangeResponse extends Response {
842
- body: LinkedEditingRangesBody;
842
+ readonly body: LinkedEditingRangesBody;
843
843
  }
844
844
  /**
845
845
  * Get document highlights request; value of command field is
@@ -2107,8 +2107,8 @@ declare namespace ts {
2107
2107
  }
2108
2108
  export type CreateFileWatcherEventName = "createFileWatcher";
2109
2109
  export interface CreateFileWatcherEvent extends Event {
2110
- event: CreateFileWatcherEventName;
2111
- body: CreateFileWatcherEventBody;
2110
+ readonly event: CreateFileWatcherEventName;
2111
+ readonly body: CreateFileWatcherEventBody;
2112
2112
  }
2113
2113
  export interface CreateFileWatcherEventBody {
2114
2114
  readonly id: number;
@@ -2116,8 +2116,8 @@ declare namespace ts {
2116
2116
  }
2117
2117
  export type CreateDirectoryWatcherEventName = "createDirectoryWatcher";
2118
2118
  export interface CreateDirectoryWatcherEvent extends Event {
2119
- event: CreateDirectoryWatcherEventName;
2120
- body: CreateDirectoryWatcherEventBody;
2119
+ readonly event: CreateDirectoryWatcherEventName;
2120
+ readonly body: CreateDirectoryWatcherEventBody;
2121
2121
  }
2122
2122
  export interface CreateDirectoryWatcherEventBody {
2123
2123
  readonly id: number;
@@ -2127,8 +2127,8 @@ declare namespace ts {
2127
2127
  }
2128
2128
  export type CloseFileWatcherEventName = "closeFileWatcher";
2129
2129
  export interface CloseFileWatcherEvent extends Event {
2130
- event: CloseFileWatcherEventName;
2131
- body: CloseFileWatcherEventBody;
2130
+ readonly event: CloseFileWatcherEventName;
2131
+ readonly body: CloseFileWatcherEventBody;
2132
2132
  }
2133
2133
  export interface CloseFileWatcherEventBody {
2134
2134
  readonly id: number;
@@ -2423,19 +2423,19 @@ declare namespace ts {
2423
2423
  command: CommandTypes.PrepareCallHierarchy;
2424
2424
  }
2425
2425
  export interface PrepareCallHierarchyResponse extends Response {
2426
- body: CallHierarchyItem | CallHierarchyItem[];
2426
+ readonly body: CallHierarchyItem | CallHierarchyItem[];
2427
2427
  }
2428
2428
  export interface ProvideCallHierarchyIncomingCallsRequest extends FileLocationRequest {
2429
2429
  command: CommandTypes.ProvideCallHierarchyIncomingCalls;
2430
2430
  }
2431
2431
  export interface ProvideCallHierarchyIncomingCallsResponse extends Response {
2432
- body: CallHierarchyIncomingCall[];
2432
+ readonly body: CallHierarchyIncomingCall[];
2433
2433
  }
2434
2434
  export interface ProvideCallHierarchyOutgoingCallsRequest extends FileLocationRequest {
2435
2435
  command: CommandTypes.ProvideCallHierarchyOutgoingCalls;
2436
2436
  }
2437
2437
  export interface ProvideCallHierarchyOutgoingCallsResponse extends Response {
2438
- body: CallHierarchyOutgoingCall[];
2438
+ readonly body: CallHierarchyOutgoingCall[];
2439
2439
  }
2440
2440
  export enum IndentStyle {
2441
2441
  None = "None",
@@ -2839,7 +2839,7 @@ declare namespace ts {
2839
2839
  private changedFilesForExportMapCache;
2840
2840
  private moduleSpecifierCache;
2841
2841
  private symlinks;
2842
- jsDocParsingMode: JSDocParsingMode | undefined;
2842
+ readonly jsDocParsingMode: JSDocParsingMode | undefined;
2843
2843
  isKnownTypesPackageName(name: string): boolean;
2844
2844
  installPackage(options: InstallPackageOptions): Promise<ApplyCodeActionCommandResult>;
2845
2845
  getCompilationSettings(): ts.CompilerOptions;
@@ -6934,7 +6934,6 @@ declare namespace ts {
6934
6934
  downlevelIteration?: boolean;
6935
6935
  emitBOM?: boolean;
6936
6936
  emitDecoratorMetadata?: boolean;
6937
- enforceReadonly?: boolean;
6938
6937
  exactOptionalPropertyTypes?: boolean;
6939
6938
  experimentalDecorators?: boolean;
6940
6939
  forceConsistentCasingInFileNames?: boolean;