@botonic/react
Version:
Build Chatbots using React
15 lines • 632 B
JavaScript
import { getProperty } from '../util/objects';
export function warnDeprecated(legacyCode, newCode, extraInfo = undefined) {
console.warn(`${extraInfo ? extraInfo : ''} '${legacyCode}' is deprecated. Use '${newCode}' instead.`);
}
export function warnDeprecatedProps(props, extraInfo) {
const legacyNewProps = [
{ legacy: 'enableTimestamps', new: 'enabletimestamps' },
{ legacy: 'imageStyle', new: 'imagestyle' },
];
legacyNewProps.forEach(p => {
if (getProperty(props, p.legacy) !== undefined)
warnDeprecated(p.legacy, p.new, extraInfo);
});
}
//# sourceMappingURL=logs.js.map