diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2022-03-14 23:38:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-14 23:38:53 +0100 |
commit | 88d0f01948b68f4a4d87e02a5138e94ac0a6eaea (patch) | |
tree | 2b50e5d2c6990c94f47e604281f3557b3efd9736 /cli/build.rs | |
parent | 9f494dc405afc4b1b29fa4c813bd5751f26aaa36 (diff) |
feat(ops): custom arity (#13949)
Also cleanup & drop ignored wildcard op-args
Diffstat (limited to 'cli/build.rs')
-rw-r--r-- | cli/build.rs | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/cli/build.rs b/cli/build.rs index f1eb1829c..d118dd5b9 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -192,7 +192,6 @@ fn create_compiler_snapshot( fn op_build_info( state: &mut OpState, _args: Value, - _: (), ) -> Result<Value, AnyError> { let build_specifier = "asset:///bootstrap.ts"; let build_libs = state.borrow::<Vec<&str>>(); @@ -203,31 +202,19 @@ fn create_compiler_snapshot( } #[op] - fn op_cwd( - _state: &mut OpState, - _args: Value, - _: (), - ) -> Result<Value, AnyError> { + fn op_cwd(_state: &mut OpState, _args: Value) -> Result<Value, AnyError> { Ok(json!("cache:///")) } #[op] - fn op_exists( - _state: &mut OpState, - _args: Value, - _: (), - ) -> Result<Value, AnyError> { + fn op_exists(_state: &mut OpState, _args: Value) -> Result<Value, AnyError> { Ok(json!(false)) } #[op] // using the same op that is used in `tsc.rs` for loading modules and reading // files, but a slightly different implementation at build time. - fn op_load( - state: &mut OpState, - args: LoadArgs, - _: (), - ) -> Result<Value, AnyError> { + fn op_load(state: &mut OpState, args: LoadArgs) -> Result<Value, AnyError> { let op_crate_libs = state.borrow::<HashMap<&str, &str>>(); let path_dts = state.borrow::<PathBuf>(); let re_asset = |