String enum resolution? #2389
Unanswered
mary-ext
asked this question in
Clarifications and "Why?"
Replies: 1 comment
-
cc: @devinivy we discussed this briefly this morning I'm not really sure what is going on here in the TypeScript code. My understanding/assumption is that these are not really even refs, just strings. Probably we should update the lexicon itself to have the fully-qualified references, not just the fragment. I'm particularly confused by the "lex:" prefix, have not seen that anywhere else. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This definition seems to be the only one that makes use of this functionality, where if the value starts with
#
then the resulting types would start withlex:
with the full NSID written, suggesting it's being turned into references?atproto/lexicons/tools/ozone/moderation/defs.json
Lines 165 to 173 in 6b3addd
atproto/packages/api/src/client/types/tools/ozone/moderation/defs.ts
Lines 133 to 138 in 6b3addd
Meanwhile, on another enum...
atproto/lexicons/com/atproto/moderation/defs.json
Lines 5 to 16 in 6b3addd
atproto/packages/api/src/client/types/com/atproto/moderation/defs.ts
Lines 9 to 17 in 6b3addd
I'm not sure if anything's been documented in this area, and I've just been leaving it alone in my own code generation tools because I'm not quite sure what to do with it.
Beta Was this translation helpful? Give feedback.
All reactions