-
-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(oxc): add napi transform options (#6268)
- Loading branch information
Showing
13 changed files
with
80 additions
and
81 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use napi_derive::napi; | ||
|
||
use super::source_map::SourceMap; | ||
|
||
#[napi(object)] | ||
pub struct IsolatedDeclarationsResult { | ||
pub code: String, | ||
pub map: Option<SourceMap>, | ||
pub errors: Vec<String>, | ||
} | ||
|
||
#[napi(object)] | ||
#[derive(Debug, Default, Clone, Copy)] | ||
pub struct IsolatedDeclarationsOptions { | ||
/// Do not emit declarations for code that has an @internal annotation in its JSDoc comment. | ||
/// This is an internal compiler option; use at your own risk, because the compiler does not check that the result is valid. | ||
/// | ||
/// Default: `false` | ||
/// | ||
/// See <https://www.typescriptlang.org/tsconfig/#stripInternal> | ||
pub strip_internal: Option<bool>, | ||
|
||
pub sourcemap: Option<bool>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
mod parse; | ||
#[cfg(feature = "parser")] | ||
pub mod parse; | ||
|
||
pub use parse::*; | ||
#[cfg(feature = "sourcemap")] | ||
pub mod source_map; | ||
|
||
#[cfg(feature = "isolated_declarations")] | ||
pub mod isolated_declarations; | ||
|
||
#[cfg(feature = "transformer")] | ||
pub mod transform; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters