From 8334bd4fa2bb232451fa889a984eb8d6920e6686 Mon Sep 17 00:00:00 2001 From: Dunqing <29533304+Dunqing@users.noreply.github.com> Date: Fri, 30 Aug 2024 09:30:14 +0000 Subject: [PATCH] docs(transformer): add documentation for `Targets::get_targets` (#5337) `Targets` will be public in follow-up PRs. --- crates/oxc_transformer/src/env/targets/query.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/oxc_transformer/src/env/targets/query.rs b/crates/oxc_transformer/src/env/targets/query.rs index 642503ec569c0..21d29915fba95 100644 --- a/crates/oxc_transformer/src/env/targets/query.rs +++ b/crates/oxc_transformer/src/env/targets/query.rs @@ -29,6 +29,13 @@ impl Default for Targets { } impl Targets { + /// Parse the query and return the parsed Versions. + /// + /// # Errors + /// + /// This function returns an error if: + /// * The query is not supported. + /// * The query is invalid. pub fn get_targets(self) -> Result { match self { Targets::Versions(v) => Ok(v),