Parkour-Labs / dust

State management all-in-one: reactivity, persistence and synchronisation.
Apache License 2.0
2 stars 0 forks source link

Fix the issue with the optional values in `AtomOption` still being generated as nullable. #15

Open wxxedu opened 5 months ago

wxxedu commented 5 months ago

In the current dust tm example's generated code, we have:

mixin _$Todo {
  Id get id;
  Atom<String> get title$;
  AtomOption<String?> get description$;
  Atom<bool> get isCompleted$;
  LinkOption<Todo?> get parent$;
  Backlinks<Todo> get children$;

  void delete();
}

Do note that AtomOption<String?> get description$; should instead be AtomOption<String> get description$;, as the nullability is already implied by the Option. This needs to be fixed.