register.js 602 B

1234567891011121314151617181920212223
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.registerTickMethod = exports.getTickMethod = void 0;
  4. var methodCache = {};
  5. /**
  6. * 获取计算 ticks 的方法
  7. * @param key 键值
  8. * @returns 计算 ticks 的方法
  9. */
  10. function getTickMethod(key) {
  11. return methodCache[key];
  12. }
  13. exports.getTickMethod = getTickMethod;
  14. /**
  15. * 注册计算 ticks 的方法
  16. * @param key 键值
  17. * @param method 方法
  18. */
  19. function registerTickMethod(key, method) {
  20. methodCache[key] = method;
  21. }
  22. exports.registerTickMethod = registerTickMethod;
  23. //# sourceMappingURL=register.js.map