Skip to content
This repository was archived by the owner on Sep 29, 2020. It is now read-only.
This repository was archived by the owner on Sep 29, 2020. It is now read-only.

suppressWarnings decorator function cannot suppress deprecated decorator function call console.warn output #152

@xiaofan9

Description

@xiaofan9
import { suppressWarnings } from 'core-decorators';

class Person {
  @deprecated
  facepalm() {}

  @suppressWarnings
  facepalmWithoutWarning() {
    console.warn("it is not output"); // not output
    this.facepalm();
  }
}

let person = new Person();

person.facepalmWithoutWarning();
// no warning is logged

The above code actually runs, it will still be able to call console.warn and output the warning, but facepalmWithoutWarning function call console.warn is not output.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions