Skip to content

Commit 7c9dc45

Browse files
committed
Fix TypeScript types
Signed-off-by: Andrew Stein <[email protected]>
1 parent ce9c9af commit 7c9dc45

File tree

6 files changed

+15
-24
lines changed

6 files changed

+15
-24
lines changed

rust/perspective-js/src/rust/client.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ use wasm_bindgen::prelude::*;
2020
pub use crate::table::*;
2121
use crate::utils::{inherit_docs, ApiError, ApiResult, JsValueSerdeExt, LocalPollLoop};
2222

23-
#[wasm_bindgen(typescript_custom_section)]
24-
const TS_APPEND_CONTENT: &'static str = r#"
25-
import type {TableInitOptions} from "@finos/perspective";
26-
"#;
27-
2823
#[wasm_bindgen]
2924
extern "C" {
3025
#[derive(Clone)]

rust/perspective-js/src/rust/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ export type * from "../../src/ts/ts-rs/ViewOnUpdateResp.d.ts";
3939
export type * from "../../src/ts/ts-rs/OnUpdateOptions.d.ts";
4040
export type * from "../../src/ts/ts-rs/UpdateOptions.d.ts";
4141
42-
import type * as view_window from "../../src/ts/ts-rs/ViewWindow.d.ts";
43-
import type * as table_init_options from "../../src/ts/ts-rs/TableInitOptions.d.ts";
44-
import type * as view_config_update from "../../src/ts/ts-rs/ViewConfigUpdate.d.ts";
42+
import type {ViewWindow} from "../../src/ts/ts-rs/ViewWindow.d.ts";
43+
import type {TableInitOptions} from "../../src/ts/ts-rs/TableInitOptions.d.ts";
44+
import type {ViewConfigUpdate} from "../../src/ts/ts-rs/ViewConfigUpdate.d.ts";
4545
import type * as on_update_args from "../../src/ts/ts-rs/ViewOnUpdateResp.d.ts";
46-
import type * as on_update_options from "../../src/ts/ts-rs/OnUpdateOptions.d.ts";
47-
import type * as update_options from "../../src/ts/ts-rs/UpdateOptions.d.ts";
46+
import type {OnUpdateOptions} from "../../src/ts/ts-rs/OnUpdateOptions.d.ts";
47+
import type {UpdateOptions} from "../../src/ts/ts-rs/UpdateOptions.d.ts";
4848
"#;
4949

5050
#[cfg(feature = "export-init")]

rust/perspective-js/src/rust/table.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,6 @@ impl Table {
184184
}
185185
}
186186

187-
#[wasm_bindgen(typescript_custom_section)]
188-
const TS_APPEND_CONTENT: &'static str = r#"
189-
import type {UpdateOptions, ViewConfigUpdate} from "@finos/perspective";
190-
"#;
191-
192187
#[wasm_bindgen]
193188
extern "C" {
194189
// TODO Fix me

rust/perspective-js/src/rust/view.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ use wasm_bindgen_futures::spawn_local;
2020
use crate::table::Table;
2121
use crate::utils::{inherit_docs, ApiFuture, ApiResult, JsValueSerdeExt, LocalPollLoop};
2222

23-
#[wasm_bindgen(typescript_custom_section)]
24-
const TS_APPEND_CONTENT: &'static str = r#"
25-
import type {OnUpdateOptions, ViewWindow} from "@finos/perspective";
26-
"#;
27-
2823
#[wasm_bindgen]
2924
extern "C" {
3025
#[wasm_bindgen(typescript_type = "ViewWindow")]

rust/perspective-viewer/src/rust/lib.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,16 @@ use crate::custom_elements::export_dropdown::ExportDropDownMenuElement;
4949
use crate::custom_elements::viewer::PerspectiveViewerElement;
5050
use crate::utils::define_web_component;
5151

52-
// #[wasm_bindgen(typescript_custom_section)]
53-
// const TS_APPEND_CONTENT: &'static str = r#"
54-
// import type * as perspective from "../../dist/wasm/ViewConfigUpdate.ts";
55-
// "#;
52+
#[wasm_bindgen(typescript_custom_section)]
53+
const TS_APPEND_CONTENT: &'static str = r#"
54+
import type {
55+
TableInitOptions,
56+
ViewWindow,
57+
OnUpdateOptions,
58+
UpdateOptions,
59+
ViewConfigUpdate,
60+
} from "@finos/perspective";
61+
"#;
5662

5763
/// Register a plugin globally.
5864
#[wasm_bindgen]
1.35 KB
Binary file not shown.

0 commit comments

Comments
 (0)