@@ -8,24 +8,27 @@ export interface I18nError extends CompileError {
88 code : I18nErrorCodes
99}
1010
11+ let code = CompileErrorCodes . __EXTEND_POINT__
12+ const inc = ( ) => code ++
13+
1114export const I18nErrorCodes = {
1215 // composer module errors
13- UNEXPECTED_RETURN_TYPE : CompileErrorCodes . __EXTEND_POINT__ ,
16+ UNEXPECTED_RETURN_TYPE : code , // 15
1417 // legacy module errors
15- INVALID_ARGUMENT : CompileErrorCodes . __EXTEND_POINT__ + 1 ,
18+ INVALID_ARGUMENT : inc ( ) , // 16
1619 // i18n module errors
17- MUST_BE_CALL_SETUP_TOP : CompileErrorCodes . __EXTEND_POINT__ + 2 ,
18- NOT_INSLALLED : CompileErrorCodes . __EXTEND_POINT__ + 3 ,
19- NOT_AVAILABLE_IN_LEGACY_MODE : CompileErrorCodes . __EXTEND_POINT__ + 4 ,
20+ MUST_BE_CALL_SETUP_TOP : inc ( ) , // 17
21+ NOT_INSLALLED : inc ( ) , // 18
22+ NOT_AVAILABLE_IN_LEGACY_MODE : inc ( ) , // 19
2023 // directive module errors
21- REQUIRED_VALUE : CompileErrorCodes . __EXTEND_POINT__ + 5 ,
22- INVALID_VALUE : CompileErrorCodes . __EXTEND_POINT__ + 6 ,
24+ REQUIRED_VALUE : inc ( ) , // 20
25+ INVALID_VALUE : inc ( ) , // 21
2326 // vue-devtools errors
24- CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN : CompileErrorCodes . __EXTEND_POINT__ + 7 ,
27+ CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN : inc ( ) , // 22
2528 // unexpected error
26- UNEXPECTED_ERROR : CompileErrorCodes . __EXTEND_POINT__ + 8 ,
29+ UNEXPECTED_ERROR : inc ( ) , // 23
2730 // for enhancement
28- __EXTEND_POINT__ : CompileErrorCodes . __EXTEND_POINT__ + 9
31+ __EXTEND_POINT__ : inc ( ) // 24
2932} as const
3033
3134type I18nErrorCodes = typeof I18nErrorCodes [ keyof typeof I18nErrorCodes ]
0 commit comments