cEnumToJSType static method

JSType cEnumToJSType(
  1. int typeCode
)

C enum to enum JSType

Implementation

static JSType cEnumToJSType(int typeCode) {
  switch (typeCode) {
    case JSValueRef.JSType.kJSTypeNull:
      return JSType.kJSTypeNull;
    case JSValueRef.JSType.kJSTypeBoolean:
      return JSType.kJSTypeBoolean;
    case JSValueRef.JSType.kJSTypeNumber:
      return JSType.kJSTypeNumber;
    case JSValueRef.JSType.kJSTypeString:
      return JSType.kJSTypeString;
    case JSValueRef.JSType.kJSTypeObject:
      return JSType.kJSTypeObject;
    case JSValueRef.JSType.kJSTypeSymbol:
      return JSType.kJSTypeSymbol;
    default:
      return JSType.kJSTypeUndefined;
  }
}