ts-transformer-properties-rename
ts-transformer-properties-rename copied to clipboard
Fixed handling unnamed/undeclared returned type from functions
This changes almost fix #27 for now (currently I have no idea how to handle specified unnamed returned typed so I've asked for help in TypeScript discord https://discord.com/channels/508357248330760243/640177429775777792/927239241459724298).
The response: https://discord.com/channels/508357248330760243/640177429775777792/933032112909586452 (vscode/ts uses checker.isTypeAssignableTo to detect this).
Based on the answer, it seems that to check this we need to compare unnamed object's type with every publicly accessible type, which might and will break the code because it is quite possible that 2 types might be assigned to each other and they will be unrelated.
Probably it is worth to leave it as is right now and say that this is expected behaviour that we don't handle it and you need to specify types explicitly everywhere if needed.