### Start Development Server Source: https://github.com/nodejs/amaro/blob/main/deps/swc/bindings/binding_core_wasm/example/readme.txt Command to launch the webpack-dev-server for the example application. ```bash cd swc/wasm/example npm run serve ``` -------------------------------- ### Install Dependencies Source: https://github.com/nodejs/amaro/blob/main/deps/swc/bindings/binding_core_wasm/example/readme.txt Command to install the necessary npm packages for the example project. ```bash cd swc/wasm/example npm install ``` -------------------------------- ### Build and Test Commands Source: https://github.com/nodejs/amaro/blob/main/CONTRIBUTING.md Commands to install dependencies, build the project, and execute the test suite. ```bash npm install ``` ```bash npm run build ``` ```bash npm test ``` -------------------------------- ### Install ESLint Package with npm Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_html_parser/benches/files/github_com_17_05_2022.html This command installs the ESLint package and its dependencies using npm. It audits the installed packages and reports on funding opportunities. ```bash npm install eslint ``` -------------------------------- ### TypeScript Example with Enums and Namespaces Source: https://context7.com/nodejs/amaro/llms.txt A TypeScript file demonstrating enums and namespaces, which requires Amaro's transform mode for execution. This example shows basic logging and validation. ```typescript // src/app.ts - TypeScript file with enums (requires transform mode) enum LogLevel { Debug = 0, Info = 1, Warn = 2, Error = 3 } namespace Validation { export interface StringValidator { isAcceptable(s: string): boolean; } const lettersRegexp = /^[A-Za-z]+$/; export class LettersOnlyValidator implements StringValidator { isAcceptable(s: string): boolean { return lettersRegexp.test(s); } } } const level: LogLevel = LogLevel.Info; console.log(`Current log level: ${level}`); const validator = new Validation.LettersOnlyValidator(); console.log(validator.isAcceptable("Hello")); // true console.log(validator.isAcceptable("Hello123")); // false ``` -------------------------------- ### Example TypeScript File for Loader Source: https://context7.com/nodejs/amaro/llms.txt A sample TypeScript file compatible with the strip loader. ```typescript // src/index.ts - Example TypeScript file interface Config { port: number; host: string; } const config: Config = { port: 3000, host: "localhost" }; function startServer(cfg: Config): void { console.log(`Starting server at ${cfg.host}:${cfg.port}`); } startServer(config); // Output: Starting server at localhost:3000 ``` -------------------------------- ### Install Amaro Source: https://github.com/nodejs/amaro/blob/main/README.md Install the package via npm. ```shell npm install amaro ``` -------------------------------- ### Monorepo TypeScript Import Example Source: https://context7.com/nodejs/amaro/llms.txt An example TypeScript file within a monorepo that imports a utility module using its package name. Imports resolve to TypeScript source directly during development due to monorepo configuration. ```typescript // packages/app/src/index.ts // Imports resolve to TypeScript source in development import { validateEmail } from "@myorg/shared-utils/validation"; const email: string = "test@example.com"; console.log(validateEmail(email)); ``` -------------------------------- ### Run Fixture Tests with Debug Features Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_ecma_minifier/README.md Run fixture tests with the 'debug' feature enabled to get location information for changes. This aids in debugging specific test cases. ```bash ./scripts/test.sh foo --features debug ``` -------------------------------- ### Monorepo Package.json Exports Configuration Source: https://context7.com/nodejs/amaro/llms.txt Example `package.json` configuration for a monorepo package, enabling direct TypeScript imports using the 'typescript' condition. This facilitates development by bypassing build steps. ```json { "name": "@myorg/shared-utils", "exports": { ".": { "typescript": "./src/index.ts", "types": "./dist/index.d.ts", "require": "./dist/index.js", "import": "./dist/index.js" }, "./validation": { "typescript": "./src/validation/index.ts", "types": "./dist/validation/index.d.ts", "require": "./dist/validation/index.js", "import": "./dist/validation/index.js" } } } ``` -------------------------------- ### Example of Scoped TLS Usage with Panic Message Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/better_scoped_tls/README.md This example demonstrates the expected panic message when a scoped thread-local variable is used without being set. This behavior is characteristic of the better_scoped_tls crate. ```rust You should perform this operation in the closure passed to `set` of better_scoped_tls::tests::TESTTLS ``` -------------------------------- ### Clone Octocat Classifier Repository Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_html_parser/benches/files/github_com_17_05_2022.html Use this command to clone the Octocat Classifier project locally. Ensure you have Git installed. ```bash git clone https://github.com/jasonetco/octocat-classifier ``` -------------------------------- ### Initialize and Run User Word Slider Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_html_parser/benches/files/stackoverflow_com_17_05_2022.html Initializes a word slider by creating span elements for each word and then starts the slider animation. Ensure the target element has a 'data-words' attribute containing comma-separated words. ```javascript window.onload = function () { var userSlider = document.querySelector(".js-user-slider"); var userWordsData = userSlider.getAttribute("data-words").split(","); var userWords; var userWordsWidth = []; var userSliderCount = 0; var userSliderStarted = false; var userSliderTimeout; var userSliderPrev = null; var userSliderCur; function userSliderInit() { userSlider.innerHTML = ""; for (var i = 0; i < userWordsData.length; ++i) { var _span = document.createElement("span"); var _text = document.createTextNode(userWordsData[i]); var _elm = _span.appendChild(_text); userSlider.appendChild(_span); } userWords = userSlider.childNodes; userSlider.style.width = userSlider.clientWidth + "px"; userSlider.style.height = userSlider.clientHeight + "px"; userSliderRun(); } function userSliderRun() { clearTimeout(userSliderTimeout); userSliderTimeout = setTimeout( function () { userSlider.classList.add("js-loaded"); userSliderStarted = true; userSliderCur = userWords[userSliderCount]; if (userSliderPrev) { userSliderPrev.classList.add("js-user-slide-out"); userSliderCur.classList.remove("js-user-slide-out"); userSliderCur.classList.add("js-user-slide-in"); } else { userSliderCur.classList.add("js-user-slide-init"); } userSlider.style.width = userSliderCur.clientWidth + "px"; userSlider.style.height = userSliderCur.clientHeight + "px"; userSliderPrev = userSliderCur; if (userSliderCount === userWords.length - 1) { userSliderCount = 0; } else { userSliderCount++; } userSliderRun(); }, userSliderStarted ? 2000 : 0 ); } userSliderInit(); }; ``` -------------------------------- ### Run Execution Tests with Debug Features Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_ecma_minifier/README.md Run execution tests with the 'debug' feature enabled to get extensive logging. This helps in identifying the code responsible for optimizations by searching for the 'change' keyword. ```bash cargo test --features debug ``` -------------------------------- ### Verify fixture tests Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_ecma_transforms_typescript/AGENTS.md Execute this command to verify that the current implementation matches the expected fixture outputs. ```bash cargo test -p swc_ecma_transforms_typescript ``` -------------------------------- ### Build SWC for Web Source: https://github.com/nodejs/amaro/blob/main/deps/swc/bindings/binding_core_wasm/example/readme.txt Commands to navigate to the WASM directory and execute the build script. ```bash cd swc/wasm ./scripts/build_web_release.sh ``` -------------------------------- ### Verify Fixture Outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_xml_codegen/AGENTS.md Run this command to verify fixture outputs without updating them. This is recommended before finalizing changes. ```bash cargo test -p swc_xml_codegen ``` -------------------------------- ### Run Fixture Tests Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_ecma_minifier/README.md Execute fixture tests for the SWC minifier. You can specify a file path to run a subset of tests. ```bash ./scripts/test.sh ``` -------------------------------- ### Verify fixture tests Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_css_lints/AGENTS.md Execute this command to verify that all tests pass against the current fixture outputs. ```bash cargo test -p swc_css_lints ``` -------------------------------- ### Verify Fixture Outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_ecma_transforms_module/AGENTS.md Run this command to verify fixture outputs without updating them. This is useful before committing changes. ```bash cargo test -p swc_ecma_transforms_module ``` -------------------------------- ### Create GitHub Repository with GitHub CLI Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_html_parser/benches/files/github_com_17_05_2022.html This command uses the GitHub CLI to create a new repository named 'octocat-classifier' for the current user. ```bash gh repo create octocat-classifier ``` -------------------------------- ### Verify fixture test outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_html_codegen/AGENTS.md Run this command to verify the current fixture outputs without applying updates. ```bash cargo test -p swc_html_codegen ``` -------------------------------- ### Transform TypeScript with Full Options Source: https://context7.com/nodejs/amaro/llms.txt Demonstrates using transformSync with specific transformation settings and source map generation. ```typescript const amaro = require('amaro'); const { code, map } = amaro.transformSync(` enum Direction { Up = 1, Down = 2, } class Vector { constructor(public x: number, public y: number) {} } const dir: Direction = Direction.Up; `, { mode: "transform", sourceMap: true, filename: "vector.ts", transform: { verbatimModuleSyntax: true, nativeClassProperties: true, noEmptyExport: true, importNotUsedAsValues: "preserve" } }); console.log(code); console.log(JSON.parse(map)); // Parsed source map object ``` -------------------------------- ### Verify Fixture Outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/jsdoc/AGENTS.md Run this command to verify fixture test outputs without updating them. This is recommended before committing changes. ```bash cargo test -p jsdoc ``` -------------------------------- ### Verify Fixture Tests Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_css_minifier/AGENTS.md Run this command to verify fixture tests without updating outputs. This is recommended before committing changes. ```bash cargo test -p swc_css_minifier ``` -------------------------------- ### Verify Fixture Tests Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_core/AGENTS.md Run this command to verify fixture tests without updating outputs. This is recommended before finalizing changes. ```bash cargo test -p swc_core. ``` -------------------------------- ### Verify Fixture Outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_plugin_backend_tests/AGENTS.md Run this command to verify fixture test outputs without updating them. This is recommended before finalizing changes. ```bash cargo test -p swc_plugin_backend_tests ``` -------------------------------- ### Update Fixture Outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/jsdoc/AGENTS.md Use this command to update generated fixture outputs. Ensure you are in the correct project directory. ```bash UPDATE=1 cargo test -p jsdoc ``` -------------------------------- ### Run Execution Tests Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_ecma_minifier/README.md Execute all execution tests for the SWC minifier. This command enables debug features for detailed logging. ```bash ./scripts/exec.sh ``` -------------------------------- ### Profile Minifier Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_ecma_minifier/README.md Run this script to profile the minifier on a directory of input files. This command is specific to macOS. ```bash ./scripts/instrument/all.sh path/to/input/dir ``` -------------------------------- ### Update Fixture Outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_core/AGENTS.md Use this command to update generated fixture outputs. Ensure you are in the correct directory and have the necessary environment variables set. ```bash UPDATE=1 cargo test -p swc_core. ``` -------------------------------- ### Implement Interactive Use Case Selector Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_html_parser/benches/files/stackoverflow_com_17_05_2022.html Sets up an interactive use case selector where clicking on a use case highlights it and automatically cycles through them at a set interval. This script requires elements with the class 'js-use-case'. ```javascript (function () { var useCases = document.querySelectorAll(".js-use-case"); var useCaseClassActive = "js-use-case wmn3 fc-white d:fc-black js-use-case--is-active c-pointer flex--item bg-black-700 d:bg-black-100 py32 bar-lg bs-md"; var useCaseClass = "js-use-case c-pointer fc-black-025 h:bg-black-800 bar-lg flex--item py32"; var useCaseCur = 0; var useCasePlayer; var useCaseSpeed = 5000; for (var i = 0; i < useCases.length; ++i) { var useCase = useCases[i]; useCase.addEventListener("click", function(event) { useCaseShow(event.currentTarget, i); clearInterval(useCasePlayer); }); } function useCaseReset() { for (var i = 0; i < useCases.length; ++i) { useCases[i].className = useCaseClass; } } function useCaseShow(el) { useCaseReset(); el.className = useCaseClassActive; } function useCaseInit() { useCasePlayer = setInterval(function() { if (useCaseCur === useCases.length) { useCaseCur = 0; } useCaseShow(useCases[useCaseCur++]) }, useCaseSpeed) } //useCaseInit(); })(); ``` -------------------------------- ### Parse a JavaScript Program Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_es_parser/README.md This Rust code snippet demonstrates how to parse a JavaScript program using swc_es_parser. It involves setting up a SourceMap, creating a SourceFile, initializing a Lexer with default syntax, and then using a Parser to parse the program. ```rust use swc_common::{input::StringInput, FileName, SourceMap}; use swc_es_parser::{lexer::Lexer, Parser, Syntax}; let cm = SourceMap::default(); let fm = cm.new_source_file(FileName::Custom("a.js".into()).into(), "let a = 1;"); let lexer = Lexer::new(Syntax::default(), StringInput::from(&*fm), None); let mut parser = Parser::new_from(lexer); let parsed = parser.parse_program().unwrap(); ``` -------------------------------- ### Verify Fixture Outputs Without Updating Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_css_modules/AGENTS.md Run this command to verify fixture outputs without updating them. This is recommended before finishing changes. ```bash cargo test -p swc_css_modules ``` -------------------------------- ### Update Generated Fixture Outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_ecma_transforms/AGENTS.md Use this command to update the generated fixture outputs. Ensure you are in the correct directory and have the necessary environment variables set. ```bash UPDATE=1 cargo test -p swc_ecma_transforms ``` -------------------------------- ### Update Fixture Outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_ecma_transforms_module/AGENTS.md Use this command to update generated fixture outputs. Ensure you have the correct environment variable set. ```bash UPDATE=1 cargo test -p swc_ecma_transforms_module ``` -------------------------------- ### Update Fixture Outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_plugin_backend_tests/AGENTS.md Use this command to update generated fixture outputs. Ensure you have the correct environment variable set. ```bash UPDATE=1 cargo test -p swc_plugin_backend_tests ``` -------------------------------- ### Update Fixture Outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_xml_codegen/AGENTS.md Use this command to update generated fixture outputs. Ensure you have the correct environment variable set. ```bash UPDATE=1 cargo test -p swc_xml_codegen ``` -------------------------------- ### Update Generated Fixture Outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_css_minifier/AGENTS.md Use this command to update the generated fixture outputs. Ensure you are in the correct directory. ```bash UPDATE=1 cargo test -p swc_css_minifier ``` -------------------------------- ### Run Specific Fixture Tests Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_ecma_minifier/README.md Run fixture tests that match a specific file path. This is useful for testing changes in a particular area. ```bash ./scripts/test.sh foo ``` -------------------------------- ### Push Local Changes to GitHub Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_html_parser/benches/files/github_com_17_05_2022.html After creating a repository and making local changes, use this command to push them to the 'main' branch on GitHub. ```bash git push origin main ``` -------------------------------- ### Update Generated Fixture Outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_css_modules/AGENTS.md Use this command to update generated fixture outputs. Ensure you are in the correct directory. ```bash UPDATE=1 cargo test -p swc_css_modules ``` -------------------------------- ### Update Generated Fixture Outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_ecma_transforms_proposal/AGENTS.md Use this command to update generated fixture outputs. Ensure you have the correct package specified. ```bash UPDATE=1 cargo test -p swc_ecma_transforms_proposal ``` -------------------------------- ### Update fixture test outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_html_codegen/AGENTS.md Run this command to automatically update the generated fixture outputs for the swc_html_codegen crate. ```bash UPDATE=1 cargo test -p swc_html_codegen ``` -------------------------------- ### Update fixture outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_css_lints/AGENTS.md Run this command to regenerate fixture test outputs after making changes to linting rules. ```bash UPDATE=1 cargo test -p swc_css_lints ``` -------------------------------- ### Update fixture test outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_ecma_transforms_compat/AGENTS.md Run this command to automatically update the generated fixture outputs for the crate. ```bash UPDATE=1 cargo test -p swc_ecma_transforms_compat ``` -------------------------------- ### Verify Fixture Test Changes Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_ecma_transforms/AGENTS.md Run this command to verify your fixture test changes without updating the generated outputs. This helps in reviewing the modifications before committing. ```bash cargo test -p swc_ecma_transforms ``` -------------------------------- ### Run Parity Checks with Cargo Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_es_parser/README.md Use this command to run parity checks for the swc_es_parser crate. Ensure you are in the correct directory. ```bash cargo test -p swc_es_parser --test parity_suite ``` -------------------------------- ### Update fixture test outputs Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_ecma_transforms_typescript/AGENTS.md Run this command to regenerate fixture outputs after making changes to the transformation logic. ```bash UPDATE=1 cargo test -p swc_ecma_transforms_typescript ``` -------------------------------- ### Run Strip Loader via CLI Source: https://context7.com/nodejs/amaro/llms.txt Commands for executing TypeScript files with type stripping enabled. ```bash # Run a TypeScript file with type stripping node --import="amaro/strip" file.ts # In Node.js v22.18.0+, type stripping is enabled by default node --import="amaro/strip" app.ts # Run with watch mode for development node --watch --import="amaro/strip" src/index.ts # Use with monorepo typescript condition node --import="amaro/strip" --conditions=typescript ./src/index.ts ``` -------------------------------- ### Run Transform Loader via CLI Source: https://context7.com/nodejs/amaro/llms.txt Command for executing TypeScript files with full transformation and source maps. ```bash # Run TypeScript with full transformation and source maps node --enable-source-maps --import="amaro/transform" file.ts ``` -------------------------------- ### Box Model and Sizing Properties Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_html_parser/benches/files/css_2021_spec.html This section covers CSS properties related to element dimensions, margins, and padding. ```APIDOC ## Box Model and Sizing Properties ### Description Details CSS properties that define the dimensions, spacing, and positioning of elements on a page. ### Properties - **height**: Sets the height of an element. - **left**: Sets the offset of an element's left edge. - **margin**: Shorthand for setting `margin-top`, `margin-right`, `margin-bottom`, and `margin-left`. - **margin-bottom**: Sets the margin for the bottom side of an element. - **margin-left**: Sets the margin for the left side of an element. - **margin-right**: Sets the margin for the right side of an element. - **margin-top**: Sets the margin for the top side of an element. - **max-height**: Sets the maximum height of an element. - **max-width**: Sets the maximum width of an element. - **min-height**: Sets the minimum height of an element. - **min-width**: Sets the minimum width of an element. - **padding**: Shorthand for setting `padding-top`, `padding-right`, `padding-bottom`, and `padding-left`. - **padding-bottom**: Sets the padding for the bottom side of an element. - **padding-left**: Sets the padding for the left side of an element. - **padding-right**: Sets the padding for the right side of an element. - **padding-top**: Sets the padding for the top side of an element. - **right**: Sets the offset of an element's right edge. - **top**: Sets the offset of an element's top edge. - **width**: Sets the width of an element. ### Resources - [height](https://drafts.csswg.org/css2/#propdef-height) - [left](https://drafts.csswg.org/css2/#propdef-left) - [margin](https://drafts.csswg.org/css2/#propdef-margin) - [margin-bottom](https://drafts.csswg.org/css2/#propdef-margin-bottom) - [margin-left](https://drafts.csswg.org/css2/#propdef-margin-left) - [margin-right](https://drafts.csswg.org/css2/#propdef-margin-right) - [margin-top](https://drafts.csswg.org/css2/#propdef-margin-top) - [padding](https://drafts.csswg.org/css2/#propdef-padding) - [padding-bottom](https://drafts.csswg.org/css2/#propdef-padding-bottom) - [padding-left](https://drafts.csswg.org/css2/#propdef-padding-left) - [padding-right](https://drafts.csswg.org/css2/#propdef-padding-right) - [padding-top](https://drafts.csswg.org/css2/#propdef-padding-top) - [right](https://drafts.csswg.org/css2/#propdef-right) - [top](https://drafts.csswg.org/css2/#propdef-top) - [width](https://drafts.csswg.org/css2/#propdef-width) ``` -------------------------------- ### Run Node.js with TypeScript Condition (Strip Mode) Source: https://context7.com/nodejs/amaro/llms.txt Execute a Node.js application using the `--conditions=typescript` flag with Amaro's strip mode. This allows direct resolution of `.ts` files in development environments. ```bash # Run with typescript condition to resolve .ts files directly node --watch --import="amaro/strip" --conditions=typescript ./src/index.ts ``` -------------------------------- ### Verify Fixture Changes Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_ecma_codegen/AGENTS.md Verify changes to fixture outputs without updating them. This command checks for discrepancies. ```bash cargo test -p swc_ecma_codegen ``` -------------------------------- ### Monorepo configuration Source: https://github.com/nodejs/amaro/blob/main/README.md Configure package exports to reference TypeScript source files and run with the typescript condition. ```json "exports": { ".": { "typescript": "./src/index.ts", "types": "./dist/index.d.ts", "require": "./dist/index.js", "import": "./dist/index.js" } } ``` ```bash node --watch --import="amaro/strip" --conditions=typescript ./src/index.ts ``` -------------------------------- ### Image and Visual Properties Source: https://github.com/nodejs/amaro/blob/main/deps/swc/crates/swc_html_parser/benches/files/css_2021_spec.html This section covers CSS properties related to image rendering, orientation, and lighting effects. ```APIDOC ## Image and Visual Properties ### Description Details CSS properties for controlling how images are displayed, their orientation, and lighting effects. ### Properties - **image-orientation**: Specifies the orientation of images. - **image-rendering**: Provides a hint to the browser about the algorithm to use for rendering images. - **lighting-color**: Sets the color of the light source for filters. ### Resources - [image-orientation](https://drafts.csswg.org/css-images-3/#propdef-image-orientation) - [image-rendering](https://drafts.csswg.org/css-images-3/#propdef-image-rendering) - [lighting-color](https://drafts.fxtf.org/filter-effects-1/#propdef-lighting-color) ``` -------------------------------- ### Define Options Interface Source: https://context7.com/nodejs/amaro/llms.txt Defines the configuration structure for the transformSync function. ```typescript interface Options { // Transformation mode: "strip-only" (default) or "transform" mode?: "strip-only" | "transform"; // Source filename for error messages and source maps filename?: string; // Generate source maps (only effective in "transform" mode) sourceMap?: boolean; // Treat deprecated `module` syntax as error deprecatedTsModuleAsError?: boolean; // Transform-specific options (only apply when mode is "transform") transform?: { // Preserve import/export type syntax verbatimModuleSyntax?: boolean; // Use native class properties instead of transpiling nativeClassProperties?: boolean; // Don't create `export {}` for module context noEmptyExport?: boolean; // How to handle unused imports: "remove" or "preserve" importNotUsedAsValues?: "remove" | "preserve"; // Import/export assignment handling importExportAssignConfig?: "Classic" | "Preserve" | "NodeNext" | "EsNext"; // Disable enum member value inlining optimization tsEnumIsMutable?: boolean; }; } ```