@@ -8,24 +8,27 @@ export interface I18nError extends CompileError {
8
8
code : I18nErrorCodes
9
9
}
10
10
11
+ let code = CompileErrorCodes . __EXTEND_POINT__
12
+ const inc = ( ) => code ++
13
+
11
14
export const I18nErrorCodes = {
12
15
// composer module errors
13
- UNEXPECTED_RETURN_TYPE : CompileErrorCodes . __EXTEND_POINT__ ,
16
+ UNEXPECTED_RETURN_TYPE : code , // 15
14
17
// legacy module errors
15
- INVALID_ARGUMENT : CompileErrorCodes . __EXTEND_POINT__ + 1 ,
18
+ INVALID_ARGUMENT : inc ( ) , // 16
16
19
// 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
20
23
// 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
23
26
// vue-devtools errors
24
- CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN : CompileErrorCodes . __EXTEND_POINT__ + 7 ,
27
+ CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN : inc ( ) , // 22
25
28
// unexpected error
26
- UNEXPECTED_ERROR : CompileErrorCodes . __EXTEND_POINT__ + 8 ,
29
+ UNEXPECTED_ERROR : inc ( ) , // 23
27
30
// for enhancement
28
- __EXTEND_POINT__ : CompileErrorCodes . __EXTEND_POINT__ + 9
31
+ __EXTEND_POINT__ : inc ( ) // 24
29
32
} as const
30
33
31
34
type I18nErrorCodes = typeof I18nErrorCodes [ keyof typeof I18nErrorCodes ]
0 commit comments