github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/internal/reflectlite/reflect.go (about)

     1  package reflectlite
     2  
     3  import "reflect"
     4  
     5  func Swapper(slice interface{}) func(i, j int) {
     6  	return reflect.Swapper(slice)
     7  }
     8  
     9  type Kind = reflect.Kind
    10  type Type = reflect.Type
    11  type Value = reflect.Value
    12  
    13  const (
    14  	Invalid       Kind = reflect.Invalid
    15  	Bool          Kind = reflect.Bool
    16  	Int           Kind = reflect.Int
    17  	Int8          Kind = reflect.Int8
    18  	Int16         Kind = reflect.Int16
    19  	Int32         Kind = reflect.Int32
    20  	Int64         Kind = reflect.Int64
    21  	Uint          Kind = reflect.Uint
    22  	Uint8         Kind = reflect.Uint8
    23  	Uint16        Kind = reflect.Uint16
    24  	Uint32        Kind = reflect.Uint32
    25  	Uint64        Kind = reflect.Uint64
    26  	Uintptr       Kind = reflect.Uintptr
    27  	Float32       Kind = reflect.Float32
    28  	Float64       Kind = reflect.Float64
    29  	Complex64     Kind = reflect.Complex64
    30  	Complex128    Kind = reflect.Complex128
    31  	Array         Kind = reflect.Array
    32  	Chan          Kind = reflect.Chan
    33  	Func          Kind = reflect.Func
    34  	Interface     Kind = reflect.Interface
    35  	Map           Kind = reflect.Map
    36  	Ptr           Kind = reflect.Ptr
    37  	Slice         Kind = reflect.Slice
    38  	String        Kind = reflect.String
    39  	Struct        Kind = reflect.Struct
    40  	UnsafePointer Kind = reflect.UnsafePointer
    41  )
    42  
    43  func ValueOf(i interface{}) reflect.Value {
    44  	return reflect.ValueOf(i)
    45  }
    46  
    47  func TypeOf(i interface{}) reflect.Type {
    48  	return reflect.TypeOf(i)
    49  }
    50  
    51  type ValueError = reflect.ValueError