Crate macroforge_ts_syn

Crate macroforge_ts_syn 

Source

Re-exports§

pub use swc_core;
pub use abi::*;
pub use derive::*;
pub use errors::*;
pub use lower::*;
pub use stream::*;

Modules§

abi
derive
syn-like derive input types for TypeScript macros.
errors
lower
parse
quote
quote_helpers
Helper macros for ergonomic code generation with ts_quote!
stream
A syn-like parsing API for TypeScript using SWC.
swc_common
swc_ecma_ast

Macros§

assign_stmt
Create an assignment expression statement: lhs = rhs;
fn_assign
Create a function assignment: obj.prop = function(params) { body }; Usage: fn_assign!(ClassName.prototype.methodName, params, body_stmts) Or: fn_assign!(ClassName.prototype.methodName, body_stmts) for no params
fn_expr
Create a function expression with the given body statements
ident
member_expr
Create a member expression: obj.prop
parse_ts_macro_input
Parse a TsStream into a DeriveInput, returning early with an error MacroResult on failure.
private_ident
proto_method
Create a method assignment on a prototype with Vec body. This is a more ergonomic wrapper around fn_assign! for the common case.
quote
Supported output types
stmt_block
Create a block statement from a Vec
stmt_block_from_vec
Convert a Vec into a single block statement that can be used in ts_quote! This allows you to interpolate multiple statements where a single statement is expected.
stmt_vec

Structs§

StmtVec
Helper to pass Vec to be used inline in function bodies This is a marker type that ts_quote! can detect and handle specially