From: 三咲智子 Kevin Deng Date: Wed, 27 Sep 2023 08:40:16 +0000 (+0800) Subject: feat: export runtime error strings (#9301) X-Git-Tag: v3.4.0-alpha.1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=feb2f2edce2d91218a5e9a52c81e322e4033296b;p=thirdparty%2Fvuejs%2Fcore.git 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. --- diff --git a/packages/runtime-core/src/index.ts b/packages/runtime-core/src/index.ts index 98aee757da..85bd92e75b 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'