Syntax for Static Import of User Define Attributes
Paul Backus
snarwin at gmail.com
Thu Jul 27 21:24:28 UTC 2023
On Thursday, 27 July 2023 at 21:19:08 UTC, Vijay Nayar wrote:
> Attempted Fix 2: Enclose the entire attribute name in
> parenthesis.
> ```
> static import vibe.data.serialization;
>
> class ChatCompletionFunctions {
> @(vibe.data.serialization.name)("name")
> ...
> }
> ```
You almost had it. The correct syntax is to enclose the entire
attribute (not just the name) in parentheses:
```
class ChatCompletionFunctions {
@(vibe.data.serialization.name("name"))
string name;
}
```
More information about the Digitalmars-d-learn
mailing list