Skip to content

Commit

Permalink
Reference fx.Self in fx.As doc (#1202)
Browse files Browse the repository at this point in the history
Add a short helpful blurb about fx.Self in fx.As doc comment.
  • Loading branch information
JacobOaks authored May 21, 2024
1 parent 7dd18c6 commit abda254
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions annotated.go
Original file line number Diff line number Diff line change
Expand Up @@ -1164,6 +1164,9 @@ var _ Annotation = (*asAnnotation)(nil)
// return w, r
// }
//
// As entirely replaces the default return types of a function. In order
// to maintain the original return types when using As, see [Self].
//
// As annotation cannot be used in a function that returns an [Out] struct as a return type.
func As(interfaces ...interface{}) Annotation {
return &asAnnotation{targets: interfaces}
Expand Down

0 comments on commit abda254

Please sign in to comment.