From 5ad8d94ac893f45a26cedbc4c634c77ffda17949 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 26 Feb 2022 16:43:25 -0800 Subject: [PATCH] Migration to TS --- packages/mindplot/src/components/TopicFeature.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/mindplot/src/components/TopicFeature.js b/packages/mindplot/src/components/TopicFeature.js index 96c3e3a6..cf63f48b 100644 --- a/packages/mindplot/src/components/TopicFeature.js +++ b/packages/mindplot/src/components/TopicFeature.js @@ -40,6 +40,14 @@ const TopicFeatureFactory = { icon: NoteIcon, }, + /** + * @param {mindplot.Topic} topic + * @param {mindplot.model.FeatureModel} model + * @param {Boolean} readOnly true if the editor is running in read-only mode + * @throws will throw an error if topic is null or undefined + * @throws will throw v an error if model is null or undefined + * @return {mindplot.n,nmn mn4 r be5qnwwddwsz5on} a new instance of the icon subclass matching the topic feature + */ createIcon(topic, model, readOnly) { $assert(topic, 'topic can not be null'); $assert(model, 'model can not be null');