update readme with outline for next step
This commit is contained in:
parent
245584d30b
commit
7dfe4c3c50
@ -14,13 +14,6 @@ ts_compile.ts_function <- function(f, name = deparse(substitute(f)), ...) {
|
||||
sprintf("const %s = R.ocap([%s], %s]);", name, fn_args, result$r_type)
|
||||
}
|
||||
|
||||
# #' @export
|
||||
# ts_compile.ts_overload <- function(f, file = NULL, name = deparse(substitute(f))) {
|
||||
# cmt <- sprintf("\n// %s overloads", name)
|
||||
# oloads <- sapply(f, ts_compile, name = name)
|
||||
# paste(cmt, paste(oloads, collapse = "\n"), sep = "\n")
|
||||
# }
|
||||
|
||||
#' @export
|
||||
ts_compile.character <- function(
|
||||
f,
|
||||
|
||||
@ -84,6 +84,13 @@ type App = {
|
||||
};
|
||||
```
|
||||
|
||||
Besides generating the schema as shown above, the app object can also be 'deployed' using Rserve:
|
||||
|
||||
```r
|
||||
ts_deploy(app, port = 6311, daemon = FALSE)
|
||||
# listening on port 6311
|
||||
```
|
||||
|
||||
## State of the project
|
||||
|
||||
Here's what's currently working:
|
||||
|
||||
@ -65,4 +65,8 @@ test_that("function with complex return types", {
|
||||
|
||||
expect_silent(s$set$call(100:200))
|
||||
expect_gte(s$get$call(1), 100)
|
||||
|
||||
# you would then 'deploy' this as an App that
|
||||
# doesn't require the $call methods
|
||||
# e.g., sampler(1:10)$get(5)
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user