From 1b4369330138dc27c11367f165ab2654a338e23d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Wed, 27 Sep 2023 16:40:16 +0800 Subject: [PATCH] feat: export runtime error strings (#9301) 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 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/runtime-core/src/index.ts b/packages/runtime-core/src/index.ts index 98aee757dab..85bd92e75b0 100644 --- a/packages/runtime-core/src/index.ts +++ b/packages/runtime-core/src/index.ts @@ -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'