character-sheet
Version:
CharacterSheet library for assembling relationships between stats and modifiers.
64 lines (44 loc) • 1.89 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: operations/util/RegisterWith.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: operations/util/RegisterWith.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* A decorator which wraps any Operation extending {@link Operation}
*
* @param {Operation} OperationBaseClass The base class which provides a means to look up modules using Operation.from()
* @param {Operation} OperationToRegister The class of any operation to register.
*/
const RegisterWith = OperationBaseClass => OperationToRegister => {
OperationBaseClass.registerOperation(OperationToRegister);
return OperationToRegister;
};
export default RegisterWith;
</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Add.html">Add</a></li><li><a href="Modifier.html">Modifier</a></li><li><a href="Operation.html">Operation</a></li><li><a href="Using.html">Using</a></li></ul><h3>Global</h3><ul><li><a href="global.html#RegisterWith">RegisterWith</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Dec 25 2018 11:17:38 GMT-0800 (Pacific Standard Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>