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.
This commit is contained in:
三咲智子 Kevin Deng 2023-09-27 16:40:16 +08:00
parent f7e80ee4a0
commit feb2f2edce
No known key found for this signature in database
GPG Key ID: 69992F2250DFD93E
1 changed files with 9 additions and 0 deletions

View 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'