Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type hint shortener #67

Open
vemv opened this issue Apr 26, 2019 · 1 comment
Open

Type hint shortener #67

vemv opened this issue Apr 26, 2019 · 1 comment

Comments

@vemv
Copy link
Contributor

vemv commented Apr 26, 2019

I think it would be relatively easy to implement a formatter that achieved the following:

- (speced/defn safely-read-ns-contents [^string? buffer, ^clojure.lang.Namespace ns-obj]
+ (speced/defn safely-read-ns-contents [^string? buffer, ^Namespace ns-obj]
@vemv
Copy link
Contributor Author

vemv commented Dec 13, 2019

Also: insert :import statements if missing (people may refer to classes without importing them)

Little caveat: speced.def uses e.g. ^int? metadata, which may translate to {:tag int?} and confuse this formatter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant