-
Notifications
You must be signed in to change notification settings - Fork 349
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
Nested message named "Function" now ends up as *_FunctionMessage in generated ts. #1121
Comments
Special handling for messages that conflict with special Javascript names (Function, Date) probably should only do so if they are not nested messages? |
Hi @jdillon , ah yeah, agreed we don't need the If you could submit a PR that adds that check (where the |
@stephenh I can look, though at first glance I'm not sure how to tell if |
Np! I'm 80% sure that
That call-site also has a Those are the two things I'd try, and hopefully one of the two works. |
"Function" is builtin, but anything prefixed or suffixed for whatever reason shouldn't be handled the same way. So check if the final result is in builtin list, not the original unmodified name
I have a PR up, i didn't see the new ticket created |
"Function" is builtin, but anything prefixed or suffixed for whatever reason shouldn't be handled the same way. So check if the final result is in builtin list, not the original unmodified name
"Function" is builtin, but anything prefixed or suffixed for whatever reason shouldn't be handled the same way. So check if the final result is in builtin list, not the original unmodified name I have concerns about maybeSnakeToCamel being called earlier now, but i can't find any tests for options.snakeToCamel.includes("keys") so i'm not sure if i broke anything ``` /** Converts `key` to TS/JS camel-case idiom, unless overridden not to. */ 💡export function maybeSnakeToCamel(key: string, options: Pick<Options, "snakeToCamel">): string { if (options.snakeToCamel.includes("keys") && key.includes("_")) { return snakeToCamel(key); } else { return key; } } ``` But all tests pass
thank you! |
Caused by da048a1#diff-d34bf5280590ab473d1ad488821d664a0746c3459a2d1f3c2d7ea6037be2b042R63
from PR: #1110
This change causes nested messages to break from previous behavior.
Used to render as
interface Scope_Function
but now will render asinterface Scope_FunctionMessage
... which is erroneously appendingMessage
to this type name.The text was updated successfully, but these errors were encountered: