Skip to content

A platform for community discussion. Free, open, simple.

DEV: Deprecate `registerOption()` (#15209)

Jarek Radosz6e8df3d66b63
diff --git a/app/assets/javascripts/pretty-text/addon/pretty-text.js b/app/assets/javascripts/pretty-text/addon/pretty-text.js
index fb2ced1b0c9..830e8d00812 100644
--- a/app/assets/javascripts/pretty-text/addon/pretty-text.js
+++ b/app/assets/javascripts/pretty-text/addon/pretty-text.js
@@ -3,12 +3,16 @@ import {
setup as setupIt,
} from "pretty-text/engines/discourse-markdown-it";
import { deepMerge } from "discourse-common/lib/object";
+import deprecated from "discourse-common/lib/deprecated";
export function registerOption() {
- // TODO next major version deprecate this
- // if (window.console) {
- // window.console.log("registerOption is deprecated");
- // }
+ deprecated(
+ "`registerOption() from `pretty-text` is deprecated. Use `helper.registerOptions()` instead.",
+ {
+ since: "2.8.0.beta9",
+ dropFrom: "2.9.0.beta1",
+ }
+ );
}
export function buildOptions(state) {