fix(napi/transform): fix jsdoc links (#5886)

This commit is contained in:
Boshen 2024-09-19 13:55:29 +00:00
parent ae89145256
commit 127c88134e
2 changed files with 12 additions and 6 deletions

View file

@ -33,7 +33,7 @@ export interface IsolatedDeclarationsResult {
/**
* Configure how TSX and JSX are transformed.
*
* @see [@babel/plugin-transform-react-jsx](https://babeljs.io/docs/babel-plugin-transform-react-jsx#options)
* @see {@link https://babeljs.io/docs/babel-plugin-transform-react-jsx#options}
*/
export interface ReactBindingOptions {
/**
@ -50,7 +50,7 @@ export interface ReactBindingOptions {
*
* @default false
*
* @see [@babel/plugin-transform-react-jsx-development](https://babeljs.io/docs/babel-plugin-transform-react-jsx-development)
* @see {@link https://babeljs.io/docs/babel-plugin-transform-react-jsx-development}
*/
development?: boolean
/**
@ -64,10 +64,12 @@ export interface ReactBindingOptions {
*/
throwIfNamespace?: boolean
/**
* Enables [@babel/plugin-transform-react-pure-annotations](https://babeljs.io/docs/en/babel-plugin-transform-react-pure-annotations).
* Enables `@babel/plugin-transform-react-pure-annotations`.
*
* It will mark top-level React method calls as pure for tree shaking.
*
* @see {@link https://babeljs.io/docs/en/babel-plugin-transform-react-pure-annotations}
*
* @default true
*/
pure?: boolean

View file

@ -1,3 +1,5 @@
#![allow(rustdoc::bare_urls)]
use std::path::PathBuf;
use napi::Either;
@ -69,7 +71,7 @@ impl From<TypeScriptBindingOptions> for TypeScriptOptions {
/// Configure how TSX and JSX are transformed.
///
/// @see [@babel/plugin-transform-react-jsx](https://babeljs.io/docs/babel-plugin-transform-react-jsx#options)
/// @see {@link https://babeljs.io/docs/babel-plugin-transform-react-jsx#options}
#[napi(object)]
pub struct ReactBindingOptions {
/// Decides which runtime to use.
@ -85,7 +87,7 @@ pub struct ReactBindingOptions {
///
/// @default false
///
/// @see [@babel/plugin-transform-react-jsx-development](https://babeljs.io/docs/babel-plugin-transform-react-jsx-development)
/// @see {@link https://babeljs.io/docs/babel-plugin-transform-react-jsx-development}
pub development: Option<bool>,
/// Toggles whether or not to throw an error if an XML namespaced tag name
@ -97,10 +99,12 @@ pub struct ReactBindingOptions {
/// @default true
pub throw_if_namespace: Option<bool>,
/// Enables [@babel/plugin-transform-react-pure-annotations](https://babeljs.io/docs/en/babel-plugin-transform-react-pure-annotations).
/// Enables `@babel/plugin-transform-react-pure-annotations`.
///
/// It will mark top-level React method calls as pure for tree shaking.
///
/// @see {@link https://babeljs.io/docs/en/babel-plugin-transform-react-pure-annotations}
///
/// @default true
pub pure: Option<bool>,