Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(example-utils): Use correct return type on getter (#20334)
When return types on functions are inferred, TypeScript does not guarantee the order in which a union type's members will be enumerated. This means that API reports for APIs with inferred return types can appear to "flip flop" build to build. Using explicit function return types solves the problem, and we have a lint rule @typescript-eslint/explicit-function-return-type that is enabled in our recommended and strict configs - but of course this project is using minimal. I added a return type for the one getter that causes flip-flopping in our API docs, but I didn't do the larger change of updating the lint config to require return types.
- Loading branch information