Support for `WithPrefix`
Closed this issue · 0 comments
haejunejung commented
It supports for `WithPrefix'.
The purpose of this type is to add a prefix to a string. For example as below.
type FormEventNames = "submit" | "reset" | "change";
type CaptializedFormEventNames = Capitalize<FormEventNames>; // 'Submit' | 'Reset' | 'Change'
type FormHandlerNames = WithPrefix<CaptializedFormEventNames, "on"> // "onSubmit" | "onReset" | "onChange";
It can be especially useful when deciding on a name.
- event handler.
- api endpoint.
- css class.
- state management action handlers.
- icon system.