How should I mark a method as “obsolete” in JS?

There are a couple of things you can do in a transition period.

  1. Add the @deprecated JSDoc flag.
  2. Add a console warning message that indicates that the function is deprecated.

A sample:

/**
 * @deprecated Since version 1.0. Will be deleted in version 3.0. Use bar instead.
 */
function foo() {
  console.warn("Calling deprecated function!");
  bar();
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)