From 1f795eb291b3a1f2566b1fc191f0954ea1b25442 Mon Sep 17 00:00:00 2001 From: matanl Date: Wed, 24 Jul 2019 14:53:32 -0700 Subject: [PATCH] feat(Runtime): Add a way to display internal-only errors/messages. This will allow, for example, pointing to documentation on GitHub externally and G3Docs (internally) without making the experience worse for one set of users - copying how we currently do it within the "angular_compiler" package. PiperOrigin-RevId: 259822455 --- angular/lib/src/runtime.dart | 8 ++++++++ angular/lib/src/runtime/messages/messages.dart | 4 ++++ 2 files changed, 12 insertions(+) create mode 100644 angular/lib/src/runtime/messages/messages.dart diff --git a/angular/lib/src/runtime.dart b/angular/lib/src/runtime.dart index 7bf0e5fff1..a879d698ed 100644 --- a/angular/lib/src/runtime.dart +++ b/angular/lib/src/runtime.dart @@ -5,6 +5,8 @@ /// rely on. library angular.src.runtime; +import 'runtime/messages/messages.dart'; + export 'runtime/check_binding.dart' show UnstableExpressionError, @@ -14,3 +16,9 @@ export 'runtime/check_binding.dart' debugThrowIfChanged; export 'runtime/optimizations.dart' show isDevMode, unsafeCast; + +/// Formatting service for displaying runtime text or error message bodies. +/// +/// Internally, this may be implemented differently in order to display internal +/// only links, and likewise when exported to GitHub/Pub. +const runtimeMessages = Messages(); diff --git a/angular/lib/src/runtime/messages/messages.dart b/angular/lib/src/runtime/messages/messages.dart new file mode 100644 index 0000000000..cac055c66f --- /dev/null +++ b/angular/lib/src/runtime/messages/messages.dart @@ -0,0 +1,4 @@ +/// Base implementation of runtime message/error formatting. +class Messages { + const Messages(); +}