Skip to content

Commit

Permalink
Fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasLYang committed Nov 21, 2024
1 parent a6a9b0b commit 6b9f407
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,16 @@ impl ResolveOptions {
self
}

/// Adds a single extension to the list of extensions
/// Adds a single extension to the list of extensions. Extension must start with a `.`
///
/// ## Examples
///
/// ```
/// use oxc_resolver::ResolveOptions;
/// use std::path::{Path, PathBuf};
///
/// let options = ResolveOptions::default().with_extension("jsonc");
/// assert!(options.extensions.contains(&"jsonc".to_string()));
/// let options = ResolveOptions::default().with_extension(".jsonc");
/// assert!(options.extensions.contains(&".jsonc".to_string()));
/// ```
#[must_use]
pub fn with_extension<S: Into<String>>(mut self, extension: S) -> Self {
Expand Down

0 comments on commit 6b9f407

Please # to comment.