poka

simple typescript decorators for console.logging

Usage no npm install needed!

<script type="module">
  import poka from 'https://cdn.skypack.dev/poka';
</script>

README

poka

Poka poka. Simple typescript decorators for console logging and debugging

$ npm install --save-dev poka

@Changes()

Method decortator

Decorator for Angular components. It logs all the changes of the data-bound properties.

@Count()

Method decorator

Counts calls of the ecorated method.

@Group()

Method decorator

Groups every console logs called inside method.

@Methods()

Class decorator

Logs every method in class when it's called.

@Returned()

Method decorator

It logs what decorated method returns

@Time()

Method decoraror

Logs how much time method execution take

🆕 @NgHooks()

Class decorator

Logs whenever angular lifecycle method is called

⚗️ @Caller() - EXPERIMENTAL

Method decorator

Logs from which method the current one was called. At least it should.

It may cause errors and not work correctly, sincce it is experimental decorator ;)

Try it at Stackblitz