Skip to content

Commit f22f9a1

Browse files
committed
Export axios
1 parent fd78bb8 commit f22f9a1

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

openeo.d.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,14 @@ declare module OpenEO {
197197
* @hideconstructor
198198
*/
199199
export class Environment {
200+
/**
201+
* The axios instance to use for HTTP requests.
202+
*
203+
*
204+
* @type {object}
205+
* @static
206+
*/
207+
static axios: object;
200208
/**
201209
* Returns the name of the Environment, `Node` or `Browser`.
202210
*
@@ -829,7 +837,7 @@ declare module OpenEO {
829837
protected level: string | null;
830838
/**
831839
* @protected
832-
* @type {Set<String>}
840+
* @type {Set<string>}
833841
*/
834842
protected missing: Set<string>;
835843
/**

src/env.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1+
let Environment = null;
12
if (typeof window === 'undefined') {
2-
module.exports = require('./node');
3+
Environment = require('./node');
34
}
45
else {
5-
module.exports = require('./browser');
6-
}
6+
Environment = require('./browser');
7+
}
8+
/**
9+
* The axios instance to use for HTTP requests.
10+
*
11+
* @type {object}
12+
* @static
13+
*/
14+
Environment.axios = require('axios');
15+
16+
module.exports = Environment;

src/logs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Logs {
3535
this.level = level;
3636
/**
3737
* @protected
38-
* @type {Set<String>}
38+
* @type {Set<string>}
3939
*/
4040
this.missing = new Set();
4141
}

0 commit comments

Comments
 (0)