Skip to content

Commit

Permalink
feat: export runtime error strings (#9301)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sxzz committed Oct 23, 2023
1 parent 058a0de commit b6b3154
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/runtime-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit b6b3154

Please sign in to comment.