-
Notifications
You must be signed in to change notification settings - Fork 5
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
RFC: Rethink Annotations #60
Comments
there's 3 different annotation, and they are conflicting with each other, what should be the mock data?
|
😂yeah, this issue looks very challenging to me. i've been creating and remove branches for several times...
{{iterate 'hello' 'world'}} {{example 'a' 'b'}} {{xxx}} latter takes precedence over former expression (with respect to type evaluation order)
|
or to simplify the problem and API, we can just return metadata in |
So in this contrived example, |
i think so, as for |
we can print out a warning message actually |
if we are going to give error, how are we going to detect this? |
to check if 2 plugins apply to the same time. For example, |
tl;dr: this probably a Milestone for 2.0, for 1.0 we will still keep the current mechanism and specification, but re-design the API to be forward-compatible.
This issue is about normalizing JSDoc annotation and powerful Handlebars annotation. And we aim to achieve following goals:
converts to (in practice,
AnnotationNode
would be constructed directly, without involving handlebars conversion):@mantastyle
in their comment. So a parsed annotation always starts withAnnotationNode[]
This could also unify JSDoc annotation and handlebar annotation, and also make previous
annotationUtils
compatible with new implementation.Annotation[] => any
toAnnotationExpression
=>AnnotationNode
.As
deriveLiteral
inArrayType
runs first, then inStringType
. So{{length}}
runs first, then{{faker}}
(probably runs multiple times depending on{{length}}
, accordingly.{{key [string]}}
to manipulate keys of object{{length [number]}}
to manipulate length of array{{range min= max= precision=}}
to generate a random number given rangeThe text was updated successfully, but these errors were encountered: