Skip to content

Commit

Permalink
feat(config): add set to config
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Mar 22, 2018
1 parent eb0ff2f commit 69a6f8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/src/global/config-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,14 @@ export function createConfigController(configObj: any, platforms: PlatformConfig
return isNaN(val) ? (fallback !== undefined ? fallback : NaN) : val;
}

function set(key: string, value: string) {
configObj[key] = value;
}

return {
get,
getBoolean,
getNumber
getNumber,
set
};
}
1 change: 1 addition & 0 deletions core/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export interface Config {
get: (key: string, fallback?: any) => any;
getBoolean: (key: string, fallback?: boolean) => boolean;
getNumber: (key: string, fallback?: number) => number;
set: (key: string, value: any) => void;
}

export type CssClassMap = { [className: string]: boolean };
Expand Down

0 comments on commit 69a6f8d

Please sign in to comment.