inst/example/test_1.R

add <- function(x = ? numeric, y = ? numeric) {
    x + y
} ? numeric

add(1, 3)    # runs fine
add('a', 3)  # expect type error

x <- 'a'
add(x, 3)    # expect type error
kcf-jackson/typeChecker documentation built on Feb. 19, 2021, 2:29 a.m.