Options
All
  • Public
  • Public/Protected
  • All
Menu

Module src/core/functools/warning

core/functools/warning

This module provides a bunch of functions and decorators to mark functions with different warnings.

import { warn, warned } from 'core/functools/warning';

const foo = warn({context: 'unimplemented', name: 'foo', alternative: 'bar'}, () => {

});

function bar() {

}

class Baz {
@warned({context: 'deprecated', alternative: 'newMethod'})
oldMethod() {

}

newMethod() {}
}

Index

References

Re-exports InlineWarnOptions
Re-exports WarnAlternative
Re-exports WarnAlternativeOptions
Re-exports WarnContext
Re-exports WarnExprType
Re-exports WarnOptions
Re-exports WarnedFn

Functions

  • warned(target: object, key: string | symbol, descriptor: PropertyDescriptor): void
  • warned(opts?: WarnOptions): Function