Skip to content

Commit

Permalink
docs(transformer): add documentation for Targets::get_targets (#5337)
Browse files Browse the repository at this point in the history
`Targets` will be public in follow-up PRs.
  • Loading branch information
Dunqing committed Aug 30, 2024
1 parent 3ae94b8 commit 8334bd4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/oxc_transformer/src/env/targets/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Versions, Error> {
match self {
Targets::Versions(v) => Ok(v),
Expand Down

0 comments on commit 8334bd4

Please sign in to comment.