]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
feat: export runtime error strings (#9301)
author三咲智子 Kevin Deng <sxzz@sxzz.moe>
Wed, 27 Sep 2023 08:40:16 +0000 (16:40 +0800)
committer三咲智子 Kevin Deng <sxzz@sxzz.moe>
Fri, 27 Oct 2023 14:28:40 +0000 (23:28 +0900)
These strings are used for automatically generating error references in the documentation and should be considered internal. The code-to-string mapping is **not** part of the public API and can change between non-major versions.

They are also exposed only in dev or the esm-bundler builds.

packages/runtime-core/src/index.ts

index 98aee757dab1b653f0ab12d6aa1f8aa72dd0fae7..85bd92e75b000998212db82931c865162fbc9690 100644 (file)
@@ -140,6 +140,15 @@ export {
 } from './components/BaseTransition'
 export { initCustomFormatter } from './customFormatter'
 
+import { ErrorTypeStrings as _ErrorTypeStrings } from './errorHandling'
+/**
+ * Runtime error messages. Only exposed in dev or esm builds.
+ * @internal
+ */
+export const ErrorTypeStrings = (
+  __ESM_BUNDLER__ || __DEV__ ? _ErrorTypeStrings : null
+) as typeof _ErrorTypeStrings
+
 // For devtools
 export { devtools, setDevtoolsHook } from './devtools'