WIP: feat(node_api): Add missing functions #7
@ -19,3 +19,30 @@ const (
|
|||||||
ValueTypeExternal ValueType = C.napi_external
|
ValueTypeExternal ValueType = C.napi_external
|
||||||
ValueTypeBigint ValueType = C.napi_bigint
|
ValueTypeBigint ValueType = C.napi_bigint
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func (v ValueType) String() string {
|
||||||
|
switch v {
|
||||||
|
case ValueTypeUndefined:
|
||||||
|
return "undefined"
|
||||||
|
case ValueTypeNull:
|
||||||
|
return "null"
|
||||||
|
case ValueTypeBoolean:
|
||||||
|
return "boolean"
|
||||||
|
case ValueTypeNumber:
|
||||||
|
return "number"
|
||||||
|
case ValueTypeString:
|
||||||
|
return "string"
|
||||||
|
case ValueTypeSymbol:
|
||||||
|
return "symbol"
|
||||||
|
case ValueTypeObject:
|
||||||
|
return "object"
|
||||||
|
case ValueTypeFunction:
|
||||||
|
return "function"
|
||||||
|
case ValueTypeExternal:
|
||||||
|
return "external"
|
||||||
|
case ValueTypeBigint:
|
||||||
|
return "bigint"
|
||||||
|
default:
|
||||||
|
return "undefined"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user