typeshare
typeshare copied to clipboard
`const` support
Closes #44.
This PR will allow the typeshare
annotation to be used for const
variables. This will copy the variable declaration into the output for the respective language.
For example:
const ANSWER_TO_EVERYTHING: u32 = 42;
const BEST_FILM: &str = "The Tree of Life";
This would become:
const ANSWER_TO_EVERYTHING = 42;
const BEST_FILM = "The Tree of Life";
class Constants {
static let ANSWER_TO_EVERYTHING = 42
static let BEST_FILM = "The Tree of Life"
}
const val ANSWER_TO_EVERYTHING = 42
const val BEST_FILM = "The Tree of Life"
const ANSWER_TO_EVERYTHING = 42
const BEST_FILM = "The Tree of LIfe"
As of right now, this PR only supports integers, floats, and strings as constant types.
I would like to have this 👍
Is this still being worked on? It seems very useful
Is this still being worked on? It seems very useful
Sorry, this has been put on hold for a while. I'm no longer actively involved with this specific project but I'll try to get this merged when I can.