Skip to content

Commit

Permalink
minor doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oscartbeaumont committed Aug 1, 2024
1 parent de9d96e commit 9e282f0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions specta-jsdoc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ impl JSDoc {
/// Configure a function which is responsible for styling the comments to be exported
///
/// Implementations:
/// - [`js_doc`](crate::lang::ts::js_doc)
/// - [`js_doc`](specta_typescript::lang::ts::js_doc)
///
/// Not calling this method will default to the [`js_doc`](crate::lang::ts::js_doc) exporter.
/// Not calling this method will default to the [`js_doc`](specta_typescript::lang::ts::js_doc) exporter.
/// `None` will disable comment exporting.
/// `Some(exporter)` will enable comment exporting using the provided exporter.
pub fn comment_style(mut self, exporter: CommentFormatterFn) -> Self {
Expand Down
8 changes: 4 additions & 4 deletions specta-typescript/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ pub type Result<T> = std::result::Result<T, ExportError>;

pub(crate) type Output = Result<String>;

/// Convert a type which implements [`Type`](crate::Type) to a TypeScript string with an export.
/// Convert a type which implements [`Type`] to a TypeScript string with an export.
///
/// Eg. `export type Foo = { demo: string; };`
pub fn export_ref<T: NamedType>(_: &T, conf: &Typescript) -> Output {
export::<T>(conf)
}

/// Convert a type which implements [`Type`](crate::Type) to a TypeScript string with an export.
/// Convert a type which implements [`Type`] to a TypeScript string with an export.
///
/// Eg. `export type Foo = { demo: string; };`
pub fn export<T: NamedType>(conf: &Typescript) -> Output {
Expand All @@ -59,14 +59,14 @@ pub fn export<T: NamedType>(conf: &Typescript) -> Output {
result
}

/// Convert a type which implements [`Type`](crate::Type) to a TypeScript string.
/// Convert a type which implements [`Type`] to a TypeScript string.
///
/// Eg. `{ demo: string; };`
pub fn inline_ref<T: Type>(_: &T, conf: &Typescript) -> Output {
inline::<T>(conf)
}

/// Convert a type which implements [`Type`](crate::Type) to a TypeScript string.
/// Convert a type which implements [`Type`] to a TypeScript string.
///
/// Eg. `{ demo: string; };`
pub fn inline<T: Type>(conf: &Typescript) -> Output {
Expand Down
10 changes: 5 additions & 5 deletions specta-typescript/src/typescript.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ impl Typescript {
/// Configure a function which is responsible for styling the comments to be exported
///
/// Implementations:
/// - [`js_doc`](crate::lang::ts::js_doc)
/// - [`js_doc`](specta_typescript::js_doc)
///
/// Not calling this method will default to the [`js_doc`](crate::lang::ts::js_doc) exporter.
/// Not calling this method will default to the [`js_doc`](specta_typescript::js_doc) exporter.
/// `None` will disable comment exporting.
/// `Some(exporter)` will enable comment exporting using the provided exporter.
pub fn comment_style(mut self, exporter: CommentFormatterFn) -> Self {
Expand All @@ -120,9 +120,9 @@ impl Typescript {
///
///
/// Built-in implementations:
/// - [`prettier`](specta_typescript:formatter:::prettier)
/// - [`ESLint`](specta_typescript::formatter::eslint)
/// - [`Biome`](specta_typescript::formatter::biome)e
/// - [`prettier`](crate:formatter:::prettier)
/// - [`ESLint`](crate::formatter::eslint)
/// - [`Biome`](crate::formatter::biome)e
pub fn formatter(mut self, formatter: FormatterFn) -> Self {
self.formatter = Some(formatter);
self
Expand Down

0 comments on commit 9e282f0

Please sign in to comment.