* chore: Centralize env parsing, defaults, deprecation * wip * test * test * tsc * docs, more validation * fix: Allow empty REDIS_URL (defaults to localhost) * test * fix: SLACK_MESSAGE_ACTIONS not bool * fix: Add SMTP port validation
15 lines
349 B
TypeScript
15 lines
349 B
TypeScript
/* eslint-disable @typescript-eslint/ban-types */
|
|
|
|
const Deprecated = (message?: string) => (
|
|
target: Object,
|
|
propertyKey: string
|
|
) => {
|
|
if (process.env[propertyKey]) {
|
|
console.warn(
|
|
`The environment variable ${propertyKey} is deprecated and will be removed in a future release. ${message}`
|
|
);
|
|
}
|
|
};
|
|
|
|
export default Deprecated;
|