Update docs

This commit is contained in:
Tom Elliott 2025-01-29 08:39:14 +13:00
parent 7e8f52d29c
commit 4c14d0516c
2 changed files with 9 additions and 6 deletions

View File

@ -2,22 +2,22 @@
% Please edit documentation in R/compile.R % Please edit documentation in R/compile.R
\name{ts_compile} \name{ts_compile}
\alias{ts_compile} \alias{ts_compile}
\title{Compile R functions to TypeScript schemas} \title{Compile R functions}
\usage{ \usage{
ts_compile(f, ..., name, file) ts_compile(f, ..., name, filename)
} }
\arguments{ \arguments{
\item{f}{A function or file path} \item{f}{A function or file path}
\item{...}{Additional arguments} \item{...}{Additional arguments (passed to ts_deploy)}
\item{name}{The name of the function} \item{name}{The name of the function}
\item{file}{The file path to write the TypeScript schema (optional). If \code{""}, the output is printed to the standard output console (see \code{cat}).} \item{filename}{The base file path to write the TypeScript schema and R app to (optional, uses \verb{[path of f].rserve} by default). \code{.R} and \code{.ts} file extensions are appended automatically. If \code{""}, the output is printed to the standard output console (see \code{cat}).}
} }
\value{ \value{
Character vector of TypeScript schema, or NULL if writing to file Character vector of TypeScript schema, or NULL if writing to file
} }
\description{ \description{
Compile R functions to TypeScript schemas Generates TypeScript schema for the given R function or file path. If a path, the R app is also generated.
} }

View File

@ -9,7 +9,8 @@ ts_deploy(
file = sprintf("\%s.rserve.R", tools::file_path_sans_ext(f)), file = sprintf("\%s.rserve.R", tools::file_path_sans_ext(f)),
init = NULL, init = NULL,
port = 6311, port = 6311,
run = c("no", "here", "background") run = c("no", "here", "background"),
silent = FALSE
) )
} }
\arguments{ \arguments{
@ -24,6 +25,8 @@ the initialisation function}
\item{run}{Whether to run the deployment script, \item{run}{Whether to run the deployment script,
takes values "no", "here", "background"} takes values "no", "here", "background"}
\item{silent}{Whether to print the deployment script}
} }
\value{ \value{
NULL, called to open an Rserve instance NULL, called to open an Rserve instance