fix: correct RelativeStrengthAB binding wrapper casing (#296)

The WASM and Node binding wrappers were named with the lowercase-b acronym
(WasmRelativeStrengthAb, RelativeStrengthAbNode) while the core type and every
other surface use RelativeStrengthAB. The published JS/WASM class name was
already correct via js_name/js_class, so this only aligns the internal Rust
identifiers and the auto-generated TypeScript type alias
(RelativeStrengthAbNode -> RelativeStrengthABNode). Runtime API unchanged.
This commit is contained in:
kingchenc
2026-06-14 00:50:03 +02:00
committed by GitHub
parent eb50ae4e90
commit d9e6807ca0
4 changed files with 15 additions and 6 deletions
+3 -3
View File
@@ -730,14 +730,14 @@ impl WasmCointegration {
// ---------- RelativeStrengthAB (two params, object output) ----------
#[wasm_bindgen(js_name = "RelativeStrengthAB")]
pub struct WasmRelativeStrengthAb {
pub struct WasmRelativeStrengthAB {
inner: wc::RelativeStrengthAB,
}
#[wasm_bindgen(js_class = "RelativeStrengthAB")]
impl WasmRelativeStrengthAb {
impl WasmRelativeStrengthAB {
#[wasm_bindgen(constructor)]
pub fn new(ma_period: usize, rsi_period: usize) -> Result<WasmRelativeStrengthAb, JsError> {
pub fn new(ma_period: usize, rsi_period: usize) -> Result<WasmRelativeStrengthAB, JsError> {
Ok(Self {
inner: wc::RelativeStrengthAB::new(ma_period, rsi_period).map_err(map_err)?,
})