feat(tvix/eval): implement builtins.typeOf
Change-Id: Ibc5039b444fadf6f9e5cd9132fcd825a871cee06 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6261 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
parent
5b98ece96b
commit
aeea772b1c
1 changed files with 3 additions and 0 deletions
|
@ -60,6 +60,9 @@ fn pure_builtins() -> Vec<Builtin> {
|
|||
// TODO: toString is actually not the same as Display
|
||||
Ok(Value::String(format!("{}", args[0]).into()))
|
||||
}),
|
||||
Builtin::new("typeOf", 1, |args| {
|
||||
Ok(Value::String(args[0].type_of().into()))
|
||||
}),
|
||||
]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue