typescript 4.6.0-dev.20220203 → 4.6.0-dev.20220204

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
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
69
69
  var ts;
70
70
  (function (ts) {
71
71
  ts.versionMajorMinor = "4.6";
72
- ts.version = ts.versionMajorMinor + ".0-dev.20220203";
72
+ ts.version = ts.versionMajorMinor + ".0-dev.20220204";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
package/lib/tsserver.js CHANGED
@@ -100,7 +100,7 @@ var ts;
100
100
  // The following is baselined as a literal template type without intervention
101
101
  /** The version of the TypeScript compiler release */
102
102
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
103
- ts.version = ts.versionMajorMinor + ".0-dev.20220203";
103
+ ts.version = ts.versionMajorMinor + ".0-dev.20220204";
104
104
  /* @internal */
105
105
  var Comparison;
106
106
  (function (Comparison) {
@@ -142087,6 +142087,18 @@ var ts;
142087
142087
  }
142088
142088
  }
142089
142089
  }
142090
+ if (documentation.length === 0 && ts.isIdentifier(location) && symbol.valueDeclaration && ts.isBindingElement(symbol.valueDeclaration)) {
142091
+ var declaration = symbol.valueDeclaration;
142092
+ var parent = declaration.parent;
142093
+ if (ts.isIdentifier(declaration.name) && ts.isObjectBindingPattern(parent)) {
142094
+ var name_4 = ts.getTextOfIdentifierOrLiteral(declaration.name);
142095
+ var objectType = typeChecker.getTypeAtLocation(parent);
142096
+ documentation = ts.firstDefined(objectType.isUnion() ? objectType.types : [objectType], function (t) {
142097
+ var prop = t.getProperty(name_4);
142098
+ return prop ? prop.getDocumentationComment(typeChecker) : undefined;
142099
+ }) || ts.emptyArray;
142100
+ }
142101
+ }
142090
142102
  if (tags.length === 0 && !hasMultipleSignatures) {
142091
142103
  tags = symbol.getContextualJsDocTags(enclosingDeclaration, typeChecker);
142092
142104
  }
@@ -159079,7 +159091,7 @@ var ts;
159079
159091
  var convertParamsToDestructuredObject;
159080
159092
  (function (convertParamsToDestructuredObject) {
159081
159093
  var refactorName = "Convert parameters to destructured object";
159082
- var minimumParameterLength = 2;
159094
+ var minimumParameterLength = 1;
159083
159095
  var refactorDescription = ts.getLocaleSpecificMessage(ts.Diagnostics.Convert_parameters_to_destructured_object);
159084
159096
  var toDestructuredAction = {
159085
159097
  name: refactorName,
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20220203";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20220204";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -142698,6 +142698,18 @@ var ts;
142698
142698
  }
142699
142699
  }
142700
142700
  }
142701
+ if (documentation.length === 0 && ts.isIdentifier(location) && symbol.valueDeclaration && ts.isBindingElement(symbol.valueDeclaration)) {
142702
+ var declaration = symbol.valueDeclaration;
142703
+ var parent = declaration.parent;
142704
+ if (ts.isIdentifier(declaration.name) && ts.isObjectBindingPattern(parent)) {
142705
+ var name_4 = ts.getTextOfIdentifierOrLiteral(declaration.name);
142706
+ var objectType = typeChecker.getTypeAtLocation(parent);
142707
+ documentation = ts.firstDefined(objectType.isUnion() ? objectType.types : [objectType], function (t) {
142708
+ var prop = t.getProperty(name_4);
142709
+ return prop ? prop.getDocumentationComment(typeChecker) : undefined;
142710
+ }) || ts.emptyArray;
142711
+ }
142712
+ }
142701
142713
  if (tags.length === 0 && !hasMultipleSignatures) {
142702
142714
  tags = symbol.getContextualJsDocTags(enclosingDeclaration, typeChecker);
142703
142715
  }
@@ -159690,7 +159702,7 @@ var ts;
159690
159702
  var convertParamsToDestructuredObject;
159691
159703
  (function (convertParamsToDestructuredObject) {
159692
159704
  var refactorName = "Convert parameters to destructured object";
159693
- var minimumParameterLength = 2;
159705
+ var minimumParameterLength = 1;
159694
159706
  var refactorDescription = ts.getLocaleSpecificMessage(ts.Diagnostics.Convert_parameters_to_destructured_object);
159695
159707
  var toDestructuredAction = {
159696
159708
  name: refactorName,
package/lib/typescript.js CHANGED
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20220203";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20220204";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -142698,6 +142698,18 @@ var ts;
142698
142698
  }
142699
142699
  }
142700
142700
  }
142701
+ if (documentation.length === 0 && ts.isIdentifier(location) && symbol.valueDeclaration && ts.isBindingElement(symbol.valueDeclaration)) {
142702
+ var declaration = symbol.valueDeclaration;
142703
+ var parent = declaration.parent;
142704
+ if (ts.isIdentifier(declaration.name) && ts.isObjectBindingPattern(parent)) {
142705
+ var name_4 = ts.getTextOfIdentifierOrLiteral(declaration.name);
142706
+ var objectType = typeChecker.getTypeAtLocation(parent);
142707
+ documentation = ts.firstDefined(objectType.isUnion() ? objectType.types : [objectType], function (t) {
142708
+ var prop = t.getProperty(name_4);
142709
+ return prop ? prop.getDocumentationComment(typeChecker) : undefined;
142710
+ }) || ts.emptyArray;
142711
+ }
142712
+ }
142701
142713
  if (tags.length === 0 && !hasMultipleSignatures) {
142702
142714
  tags = symbol.getContextualJsDocTags(enclosingDeclaration, typeChecker);
142703
142715
  }
@@ -159690,7 +159702,7 @@ var ts;
159690
159702
  var convertParamsToDestructuredObject;
159691
159703
  (function (convertParamsToDestructuredObject) {
159692
159704
  var refactorName = "Convert parameters to destructured object";
159693
- var minimumParameterLength = 2;
159705
+ var minimumParameterLength = 1;
159694
159706
  var refactorDescription = ts.getLocaleSpecificMessage(ts.Diagnostics.Convert_parameters_to_destructured_object);
159695
159707
  var toDestructuredAction = {
159696
159708
  name: refactorName,
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20220203";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20220204";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -142698,6 +142698,18 @@ var ts;
142698
142698
  }
142699
142699
  }
142700
142700
  }
142701
+ if (documentation.length === 0 && ts.isIdentifier(location) && symbol.valueDeclaration && ts.isBindingElement(symbol.valueDeclaration)) {
142702
+ var declaration = symbol.valueDeclaration;
142703
+ var parent = declaration.parent;
142704
+ if (ts.isIdentifier(declaration.name) && ts.isObjectBindingPattern(parent)) {
142705
+ var name_4 = ts.getTextOfIdentifierOrLiteral(declaration.name);
142706
+ var objectType = typeChecker.getTypeAtLocation(parent);
142707
+ documentation = ts.firstDefined(objectType.isUnion() ? objectType.types : [objectType], function (t) {
142708
+ var prop = t.getProperty(name_4);
142709
+ return prop ? prop.getDocumentationComment(typeChecker) : undefined;
142710
+ }) || ts.emptyArray;
142711
+ }
142712
+ }
142701
142713
  if (tags.length === 0 && !hasMultipleSignatures) {
142702
142714
  tags = symbol.getContextualJsDocTags(enclosingDeclaration, typeChecker);
142703
142715
  }
@@ -159690,7 +159702,7 @@ var ts;
159690
159702
  var convertParamsToDestructuredObject;
159691
159703
  (function (convertParamsToDestructuredObject) {
159692
159704
  var refactorName = "Convert parameters to destructured object";
159693
- var minimumParameterLength = 2;
159705
+ var minimumParameterLength = 1;
159694
159706
  var refactorDescription = ts.getLocaleSpecificMessage(ts.Diagnostics.Convert_parameters_to_destructured_object);
159695
159707
  var toDestructuredAction = {
159696
159708
  name: refactorName,
@@ -89,7 +89,7 @@ var ts;
89
89
  // The following is baselined as a literal template type without intervention
90
90
  /** The version of the TypeScript compiler release */
91
91
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
92
- ts.version = ts.versionMajorMinor + ".0-dev.20220203";
92
+ ts.version = ts.versionMajorMinor + ".0-dev.20220204";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "4.6.0-dev.20220203",
5
+ "version": "4.6.0-dev.20220204",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [