glutinum-org / Glutinum

MIT License
30 stars 3 forks source link

Glutinum.Chalk: Improve binding experience by using .of or .text instead of .Invoke #5

Open MangelMaxime opened 3 years ago

MangelMaxime commented 3 years ago

Related to a discussion on twitter: https://twitter.com/zaid_ajaj/status/1372641240123072519

If Glutinum allow the user to control the generated code, it would be nice to have it reword .Invoke into .text for example.

https://github.com/glutinum-org/Glutinum/blob/d866c251f9c8e3c6c5ab7c467ba758c1d0227521/glues/Chalk/src/Glutinum.Chalk.fs#L175-L195

This would change log(chalk.blue.bgRed.bold.Invoke("Hello world!")) to log(chalk.blue.bgRed.bold.text("Hello world!"))