UNPKG

494 BJavaScriptView Raw
1/* eslint no-underscore-dangle: 0 */
2export default class ConfigApi {
3 constructor({
4 storyStore
5 }) {
6 this._storyStore = void 0;
7
8 this.configure = (loaders, module, showDeprecationWarning = true) => {
9 this._storyStore.startConfiguring();
10
11 try {
12 loaders();
13
14 this._storyStore.clearError();
15 } catch (err) {
16 this._storyStore.setError(err);
17 }
18
19 this._storyStore.finishConfiguring();
20 };
21
22 this._storyStore = storyStore;
23 }
24
25}
\No newline at end of file