switch the declare/import-var function to def in state.api #171
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The switch successfully resolved the issue related to the recognition function in IntelliJ and other IDEs. We recently encountered a problem while attempting to integrate "state-flow" into ClojureDocs, where the functions in the namespace were not being displayed as expected.
About the problem
declare
was a workaround used to avoid IntelliJ not showing an error for not finding the function or an object from the namespace.import-vars
the problem is when copying the function from other namespaces together with meta. For Intellij is a problem because is dynamic (apparently Intellij uses static code). For clojuredocs is because the function meta:ns
is extracted too, given the idea that even if the function is imported into thestate.api
namespace, the function is from the source namespaceBehavior in IntelliJ
Behavior in ClojureDocs