From 303fd8e3adf583b6d1100260d4c2514c2efbef2e Mon Sep 17 00:00:00 2001 From: Mike Bender Date: Thu, 5 Dec 2024 16:07:49 -0500 Subject: [PATCH] fix: Expose TableSubscription.close() to JS (#6446) (#6448) - The close() method is only on `AbstractTableSubscription`, and it appears that it doesn't automatically get added to the JS API even though `TableSubscription` is defined as a `JsType` - Explicitly add the method to `TableSubscription` as well. - Fixes https://github.com/deephaven/deephaven-core/issues/6447 --------- Co-authored-by: Colin Alworth --- .../web/client/api/subscription/AbstractTableSubscription.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/subscription/AbstractTableSubscription.java b/web/client-api/src/main/java/io/deephaven/web/client/api/subscription/AbstractTableSubscription.java index 5165bf5fcc2..f231a93a071 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/subscription/AbstractTableSubscription.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/subscription/AbstractTableSubscription.java @@ -29,6 +29,7 @@ import io.deephaven.web.shared.data.RangeSet; import io.deephaven.web.shared.data.ShiftedRange; import io.deephaven.web.shared.fu.JsRunnable; +import jsinterop.annotations.JsMethod; import jsinterop.annotations.JsProperty; import jsinterop.base.Any; import jsinterop.base.Js; @@ -51,6 +52,7 @@ * exposed to api consumers, rather than wrapping in a Table type, as it handles the barrage stream and provides events * that client code can listen to. */ +@TsIgnore public abstract class AbstractTableSubscription extends HasEventHandling { /** * Indicates that some new data is available on the client, either an initial snapshot or a delta update. The @@ -534,6 +536,7 @@ public JsArray getColumns() { /** * Stops the subscription on the server. */ + @JsMethod public void close() { state.unretain(this); if (doExchange != null) {