Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions napi/transform/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
/**
Expand All @@ -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
/**
Expand All @@ -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
Expand Down
10 changes: 7 additions & 3 deletions napi/transform/src/options.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(rustdoc::bare_urls)]

use std::path::PathBuf;

use napi::Either;
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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>,

Expand Down