core.registry.d.ts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /**
  2. * Please use the module's default export which provides a singleton instance
  3. * Note: class is exported for typedoc
  4. */
  5. export class Registry {
  6. controllers: TypedRegistry;
  7. elements: TypedRegistry;
  8. plugins: TypedRegistry;
  9. scales: TypedRegistry;
  10. _typedRegistries: TypedRegistry[];
  11. /**
  12. * @param {...any} args
  13. */
  14. add(...args: any[]): void;
  15. remove(...args: any[]): void;
  16. /**
  17. * @param {...typeof DatasetController} args
  18. */
  19. addControllers(...args: (typeof DatasetController)[]): void;
  20. /**
  21. * @param {...typeof Element} args
  22. */
  23. addElements(...args: (typeof Element)[]): void;
  24. /**
  25. * @param {...any} args
  26. */
  27. addPlugins(...args: any[]): void;
  28. /**
  29. * @param {...typeof Scale} args
  30. */
  31. addScales(...args: (typeof Scale)[]): void;
  32. /**
  33. * @param {string} id
  34. * @returns {typeof DatasetController}
  35. */
  36. getController(id: string): typeof DatasetController;
  37. /**
  38. * @param {string} id
  39. * @returns {typeof Element}
  40. */
  41. getElement(id: string): typeof Element;
  42. /**
  43. * @param {string} id
  44. * @returns {object}
  45. */
  46. getPlugin(id: string): object;
  47. /**
  48. * @param {string} id
  49. * @returns {typeof Scale}
  50. */
  51. getScale(id: string): typeof Scale;
  52. /**
  53. * @param {...typeof DatasetController} args
  54. */
  55. removeControllers(...args: (typeof DatasetController)[]): void;
  56. /**
  57. * @param {...typeof Element} args
  58. */
  59. removeElements(...args: (typeof Element)[]): void;
  60. /**
  61. * @param {...any} args
  62. */
  63. removePlugins(...args: any[]): void;
  64. /**
  65. * @param {...typeof Scale} args
  66. */
  67. removeScales(...args: (typeof Scale)[]): void;
  68. /**
  69. * @private
  70. */
  71. private _each;
  72. /**
  73. * @private
  74. */
  75. private _exec;
  76. /**
  77. * @private
  78. */
  79. private _getRegistryForType;
  80. /**
  81. * @private
  82. */
  83. private _get;
  84. }
  85. declare const _default: Registry;
  86. export default _default;
  87. import TypedRegistry from "./core.typedRegistry.js";
  88. import DatasetController from "./core.datasetController.js";
  89. import Element from "./core.element.js";
  90. import Scale from "./core.scale.js";