paint-brush
Caching Observables/Promisesby@msarica
1,485 reads
1,485 reads

Caching Observables/Promises

by Mehmet11mJanuary 6th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

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
Mehmet

Mehmet

@msarica

msarica.com

About @msarica
LEARN MORE ABOUT @MSARICA'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Mehmet HackerNoon profile picture
Mehmet@msarica
msarica.com

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Alvinashcraft