SHARE
TWEET

Untitled

a guest Apr 21st, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. static register(typeName: string) {
  2.   return function<T extends Constructor<BlogPostComponentInterface>>(ctor: T) {
  3.     if (BlogPostTypeService.implementations.hasOwnProperty(typeName)) {
  4.       console.error("This post type has already been registered. Did you forget to change the argument for @Register()?");
  5.     }
  6.     else {
  7.       BlogPostTypeService.implementations[typeName] = ctor;
  8.     }
  9.     return ctor;
  10.   }
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top