mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
53 lines
1.5 KiB
Go
53 lines
1.5 KiB
Go
// Code generated by "stringer -type=ModuleKind -trimprefix=ModuleKind -output=modulekind_stringer_generated.go"; DO NOT EDIT.
|
|
|
|
package core
|
|
|
|
import "strconv"
|
|
|
|
func _() {
|
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
|
// Re-run the stringer command to generate them again.
|
|
var x [1]struct{}
|
|
_ = x[ModuleKindNone-0]
|
|
_ = x[ModuleKindCommonJS-1]
|
|
_ = x[ModuleKindAMD-2]
|
|
_ = x[ModuleKindUMD-3]
|
|
_ = x[ModuleKindSystem-4]
|
|
_ = x[ModuleKindES2015-5]
|
|
_ = x[ModuleKindES2020-6]
|
|
_ = x[ModuleKindES2022-7]
|
|
_ = x[ModuleKindESNext-99]
|
|
_ = x[ModuleKindNode16-100]
|
|
_ = x[ModuleKindNode18-101]
|
|
_ = x[ModuleKindNode20-102]
|
|
_ = x[ModuleKindNodeNext-199]
|
|
_ = x[ModuleKindPreserve-200]
|
|
}
|
|
|
|
const (
|
|
_ModuleKind_name_0 = "NoneCommonJSAMDUMDSystemES2015ES2020ES2022"
|
|
_ModuleKind_name_1 = "ESNextNode16Node18Node20"
|
|
_ModuleKind_name_2 = "NodeNextPreserve"
|
|
)
|
|
|
|
var (
|
|
_ModuleKind_index_0 = [...]uint8{0, 4, 12, 15, 18, 24, 30, 36, 42}
|
|
_ModuleKind_index_1 = [...]uint8{0, 6, 12, 18, 24}
|
|
_ModuleKind_index_2 = [...]uint8{0, 8, 16}
|
|
)
|
|
|
|
func (i ModuleKind) String() string {
|
|
switch {
|
|
case 0 <= i && i <= 7:
|
|
return _ModuleKind_name_0[_ModuleKind_index_0[i]:_ModuleKind_index_0[i+1]]
|
|
case 99 <= i && i <= 102:
|
|
i -= 99
|
|
return _ModuleKind_name_1[_ModuleKind_index_1[i]:_ModuleKind_index_1[i+1]]
|
|
case 199 <= i && i <= 200:
|
|
i -= 199
|
|
return _ModuleKind_name_2[_ModuleKind_index_2[i]:_ModuleKind_index_2[i+1]]
|
|
default:
|
|
return "ModuleKind(" + strconv.FormatInt(int64(i), 10) + ")"
|
|
}
|
|
}
|