code: function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors) {
              var type = getTypeForVariableLikeDeclaration(declaration, /*includeOptionality*/ true);
              if (type) {
                  if (reportErrors) {
                      reportErrorsFromWidening(declaration, type);
                  }
                  // During a normal type check we'll never get to here with a property assignment (the check of the containing
                  // object literal uses a different path). We exclude widening only so that language services and type verification
                  // tools see the actual type.
                  if (declaration.kind === 253 /* PropertyAssignment */) {
                      return type;
                  }
                  return getWidenedType(type);
              }
              // Rest parameters default to type any[], other parameters default to type any
              type = declaration.dotDotDotToken ? anyArrayType : anyType;
              // Report implicit any errors unless this is a private property within an ambient declaration
              if (reportErrors && compilerOptions.noImplicitAny) {
                  if (!declarationBelongsToPrivateAmbientMember(declaration)) {
                      reportImplicitAnyError(declaration, type);
                  }
              }
              return type;
          }
docs: Return the type associated with a variable, parameter, or property declaration. In the simple case this is the type specified in a type annotation or inferred from an initializer. However, in the case of a destructuring declaration it is a bit more involved. For example:  var [x, s = ""] = [1, "one"];  Here, the array literal [1, "one"] is contextually typed by the type [any, string], which is the implied type of the binding pattern [x, s = ""]. Because the contextual type is a tuple type, the resulting type of [1, "one"] is the tuple type [number, string]. Thus, the type inferred for 'x' is number and the type inferred for 's' is string.