import { toJsonValue } from "https://deno.land/x/authlete_deno@v1.2.7/src/type/base_extended_enum.ts";
Convert instance(s) of TExtendedEnum
class to the corresponding
JSON value(s). For example, if you pass ResponseCode.CODE
(an
instance of ResponseType
class) to this method, the method returns
'CODE'
(a string
value).
NOTE: this method is supposed to be used by class-transformer (the object mapper we internally use). Manual use of this method is not recommended.
Type Parameters
TExtendedEnum extends BaseExtendedEnum
Parameters
target: TExtendedEnum | TExtendedEnum[]
An instance of an 'extended enum' class (a class that extends
BaseExtendedEnum
class) or an array of the 'extended enum'
class. The 'extended enum' class must have a property pointing
to the instance.