moko-resources icon indicating copy to clipboard operation
moko-resources copied to clipboard

Generator for typesafe StringResource.format() method

Open y9san9 opened this issue 3 years ago • 0 comments

For strings that contain patterns, it would be useful to have functionality that recognises such strings and forces you to write .format with all passed arguments (type-safe) for formatting.

This would also get rid of the mountain of unnecessary .desc() methods on regular string resources without templates.

Thus, regular strings in MR will immediately be of type StringDesc, and strings that need to be formatted will have format method generated specifically for that string's template, which will return StringDesc.

y9san9 avatar Mar 01 '22 03:03 y9san9