Repository: axios/axios (js)

Issue:
Wrongly typed config parameter in constructor
### Describe the bug

In the typing information for the `config` constructor parameter for the `Axios` object, `config` is optional (that is, it is `config?`), but the constructor does require (at least) an empty object.

![Image](https://github.com/user-attachments/assets/9163fca6-be59-45dc-8cc0-ced59b36384f)

### To Reproduce

_No response_

### Code snippet

```js
import * as axios from 'axios';
// Typechecks correctly, fails at runtime
const instance = new axios.Axios();
```

### Expected behavior

_No response_

### Axios Version

1.8.4

### Adapter Version

_No response_

### Browser

_No response_

### Browser Version

_No response_

### Node.js Version

_No response_

### OS

_No response_

### Additional Library Versions

```bash

```

### Additional context/Screenshots

```bash

```

Pull request description:
fix(core): fix the Axios constructor implementation to treat the config argument as optional;
Fixes #6879 

Patch:
diff --git a/lib/core/Axios.js b/lib/core/Axios.js
index 386dc01..cff383e 100644
--- a/lib/core/Axios.js
+++ b/lib/core/Axios.js
@@ -20,7 +20,7 @@ const validators = validator.validators;
  */
 class Axios {
   constructor(instanceConfig) {
-    this.defaults = instanceConfig;
+    this.defaults = instanceConfig || {};
     this.interceptors = {
       request: new InterceptorManager(),
       response: new InterceptorManager()


Test patch:
diff --git a/test/unit/core/Axios.js b/test/unit/core/Axios.js
index 8958ad1..a4d62ac 100644
--- a/test/unit/core/Axios.js
+++ b/test/unit/core/Axios.js
@@ -43,5 +43,11 @@ describe('Axios', function () {
         }
       })
     });
-  })
+  });
+
+  it('should not throw if the config argument is omitted', () => {
+    const axios = new Axios();
+
+    assert.deepStrictEqual(axios.defaults, {});
+  });
 });