1b99100e2e
- Rename declarationOf to typeDeclarationOf. - Add declarationOf api for general declarations. - Tighten the type of typeDeclarationOf in the final phase to avoid unnecessary casts in user code. - Refactor message handling a bit to unify the error handling. Bug: https://github.com/dart-lang/language/issues/3216 Change-Id: Ia61da19374abec77853d37e110a08f7dfe0d3b10 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/314280 Commit-Queue: Jake Macdonald <jakemac@google.com> Auto-Submit: Jake Macdonald <jakemac@google.com> Reviewed-by: Bob Nystrom <rnystrom@google.com>