Closed safazi closed 1 year ago
What's your use case?
I meant server->client remote functions, wrote the wrong thing. There should be an option for the transformer to not generate the return type checking - the client can trust that the server will return what it is supposed to.
I meant server->client remote functions, wrote the wrong thing. There should be an option for the transformer to not generate the return type checking - the client can trust that the server will return what it is supposed to.
Is there a reason disabling the guards isn't viable? For example, introducing a settings to disable only return validation (but is there a reason to only disable return validation)?
Messed up again. I meant client -> server remote function invocation. Disabling the return guard is entirely viable (and I do that), but the server returns a big interface, and I'd rather it just not generate return type checking at all, especially as the interface gets larger and more complicated.
Messed up again. I meant client -> server remote function invocation. Disabling the return guard is entirely viable (and I do that), but the server returns a big interface, and I'd rather it just not generate return type checking at all, especially as the interface gets larger and more complicated.
Is your issue for cosmetic reasons or are you having issues with the size of the interface?
Cosmetic and efficiency. I am of the opinion that the client does has no reason to validate the servers return data at all.
Cosmetic and efficiency. I am of the opinion that the client does has no reason to validate the servers return data at all.
If guards are disabled on the client, it won't ever try to validate anything from the server.
I will take note of the cosmetic issues but that'll likely be addressed by #74 which won't inline the type guards
I am going to close this issue for now, if you think #74 isn't ideal for your use case then you can reopen but I believe it would solve the cosmetic issues you are concerned with.
I know there is a parameter to bypass the type checking, but there should be an option to prevent the transformer from actually generating the types.