diff --git a/src/tink/macro/Types.hx b/src/tink/macro/Types.hx index 17e28df..d160560 100644 --- a/src/tink/macro/Types.hx +++ b/src/tink/macro/Types.hx @@ -239,4 +239,12 @@ class Types { } } + static var SUGGESTIONS = ~/ \(Suggestions?: .*\)$/; + + static public function getFieldSuggestions(type:ComplexType, name:String):String + return switch (macro (null : $type).$name).typeof() { + case Failure(SUGGESTIONS.match(_.message) => true): SUGGESTIONS.matched(0); + default: ''; + } + }