Caching Observables/Promisesby@msarica
1,348 reads

Caching Observables/Promises

January 6th 2020
11 min
by @msarica 1,348 reads
tldt arrow
Read on Terminal Reader🖨️

Too Long; Didn't Read

Typescript decorator is a special kind of declaration that can be attached to a class declaration, method, accessor, property, or parameter. Decorators use the form @expression, where expression must evaluate to a function that will be called at runtime with information about the decorated declaration. We can create a custom decorator and drop it on a method and be done with it. We check if value is defined, if it is, return the value. If not, call the original function to get the value and return it.

Company Mentioned

Mention Thumbnail
featured image - Caching Observables/Promises
Mehmet HackerNoon profile picture

@msarica

Mehmet

About @msarica
LEARN MORE ABOUT @MSARICA'S EXPERTISE AND PLACE ON THE INTERNET.
react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa