dotnet-websharper / core

WebSharper - Full-stack, functional, reactive web apps and microservices in F# and C#
https://websharper.com
Apache License 2.0
589 stars 52 forks source link

Support `Stub` attribute for interfaces #1368

Closed Jand42 closed 6 months ago

Jand42 commented 7 months ago

Currently does nothing. Could be equivalent to Name("") on the interface, making all members use plain names without any further attributes.

Some context: by default, interface members use long unique names in JS, so that just by using different interfaces having members with the same name would not cause a naming conflict in JS. You can diverge from this default behavior by using the Name attribute, for interface members, it sets the exact JS names, and using it on the type adds a prefix for all members not directly named with Name attribute.