UNPKG

@azure/communication-react

Version:

React library for building modern communication user experiences utilizing Azure Communication Services

19 lines 805 B
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import en_US from './en-US/strings.json'; import { _getKeys } from "../../../../acs-ui-common/src"; /** * * @private */ export const createComponentStrings = (localizedStrings) => { const strings = Object.assign({}, en_US); _getKeys(localizedStrings).forEach(key => { // mark the value as unknown because the type changes based on the key. // this is unsafe at runtime as we could assign the wrong type based on the key here. // but typescript isn't smart enough to know that the key used across each access will result in the same type strings[key] = Object.assign(Object.assign({}, strings[key]), localizedStrings[key]); }); return strings; }; //# sourceMappingURL=utils.js.map