dart-lang / code_builder

A fluent API for generating valid Dart source code
https://pub.dev/packages/code_builder
BSD 3-Clause "New" or "Revised" License
427 stars 66 forks source link

add support for emitting typedefs #387

Closed devoncarew closed 1 year ago

devoncarew commented 1 year ago
devoncarew commented 1 year ago

We probably need a way to add these on a library.

Yeah, I was using this locally, but I have a few different changes to the library locally - I may have missed some relevant pieces when uploading these changes for review.

I'll check on disk and circle back to this PR.

devoncarew commented 1 year ago

I'll check on disk and circle back to this PR.

Ah, I was just using library.body.add(typedef) - which takes a Spec - the same way I was adding classes and such.