Skip to content

Commit a40243b

Browse files
update jsdoc
1 parent d7127b5 commit a40243b

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/api.factory.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
/**
2-
*
2+
* @class Api
33
* @param {Object} options
44
* @param {HTMLElement} options.containerElement - the first ancestor of the Tablist element which has a hidden overflow
55
* @param {HTMLElement} options.buttonElement - should be next sibling element of the Tablist element
66
* @param {String} [options.tabDisplay="flex"] - default value is "inline-flex". would be display of li tag
77
* @param {String} [options.containerDisplay="flex"] - default value is "inline-flex". would be display of containerElement
88
*/
9-
const Api = function (deps, options = {}) {
10-
this._setOptions(options);
9+
export const Api = function (options) {
10+
const arg = arguments;
11+
this._setOptions(arg[1]);
1112
this._tablistEl = null;
12-
const {getElManagementIns} = deps();
13+
const {getElManagementIns} = arg[0]();
1314
this._getElManagementIns = getElManagementIns;
1415
this._tabs = null;
1516
this._tabsCount = null;
@@ -164,4 +165,3 @@ Api.prototype = {
164165
: this._findFirstHiddenTabIndexDSCE(selectedTabInfo, start, stop);
165166
},
166167
};
167-
export default Api;

src/api.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
import ElManagement from './distanceFromFactory.js';
2-
import ApiFactory from './api.factory.js';
3-
export default ApiFactory.bind(undefined, () => ({getElManagementIns: (param) => new ElManagement(param)}));
2+
import {Api} from './api.factory.js';
3+
/**
4+
* @type {typeof Api}
5+
*/
6+
export default Api.bind(undefined, () => ({getElManagementIns: (params) => new ElManagement(params)}));

0 commit comments

Comments
 (0)