Skip to content

Commit

Permalink
feat(state): get unsafely retrieves values for keys
Browse files Browse the repository at this point in the history
  • Loading branch information
rafamel committed Apr 23, 2019
1 parent cc8db44 commit cb6a334
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/state/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import load, { ILoad } from './load';
import { get } from 'slimconf';
import mergewith from 'lodash.mergewith';
import { IBaseOptions, IScopeOptions, TOptions } from '~/types';
import { DEFAULT_LOG_LEVEL } from '~/constants';
Expand Down Expand Up @@ -38,8 +37,8 @@ export default {
states.scope = options;
merge();
},
get(path: keyof TOptions): any {
return get(state, path, false);
get(key: keyof TOptions): any {
return state[key];
},
load(): Promise<ILoad> {
return config.then((x) => x.load);
Expand Down

0 comments on commit cb6a334

Please sign in to comment.