Bixby Developer Center

Build Conversational Experiences


Provides functions for typed value conversion.

var types = require('types');

types.typedValue(value, type, id)

Constructs a primitive type. Usually used to return a typed value that is more specific than an action's declared output type. The new type must be an extension or contextualization of the action's declared output type.

For example a FindTickets action could declare output as event.Ticket, but in your specific implementation you want to return a myProvider.Ticket which extends event.Ticket. Instead of returning ticketObject directly, return types.typedValue(ticketObject, "myProvider.Ticket", ticketId).

Kind: Static method of typesReturns: A new primitive type as specified by the parameters.

valueStringThe new value.
typeStringA type name, for example hotel.RoomBedType.
id StringA unique id.