% Generated by roxygen2: do not edit by hand % Please edit documentation in R/types.R \name{ts_object} \alias{ts_object} \alias{is_ts_object} \alias{get_type} \alias{check_type} \title{Typed object} \usage{ ts_object( input_type = "any", return_type = "any", default = NULL, check = function() stop("Not implemented"), generic = FALSE ) is_ts_object(x) get_type(x, which = c("input", "return")) check_type(type, x) } \arguments{ \item{input_type}{The type of the object that Typescript expect to send to R.} \item{return_type}{The type of the object that Typescript expects to recieve from R.} \item{default}{The default value of the object.} \item{check}{A function that checks the object and returns it if it is valid. This operates on the R side and is mostly for development and debugging purposes. It is up to the developer to ensure that all functions return the correct type of object always.} \item{generic}{logical, if \code{TRUE} then the object is a generic type.} \item{x}{An object} \item{which}{Which type to get, either "input" or "return"} \item{type}{A ts object} } \description{ This is the base type for all typed objects, and can be used to define custom types. } \section{Functions}{ \itemize{ \item \code{is_ts_object()}: Check if an object is a ts object \item \code{get_type()}: Get the input type of a ts object \item \code{check_type()}: Check if an object has the correct type }}