From 097ecc3d4896c224a73e76cb80be1dd6a63d82f3 Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Thu, 3 Aug 2023 23:05:34 +0200 Subject: fix: Move leftover type definition to auto-generated from Rust (#450) * chore: Delete leftover type definition file * feat: Generate InstallType from Rust enum * fix: Use new generated struct --- src-tauri/bindings/InstallType.ts | 3 +++ src-tauri/src/main.rs | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 src-tauri/bindings/InstallType.ts (limited to 'src-tauri') diff --git a/src-tauri/bindings/InstallType.ts b/src-tauri/bindings/InstallType.ts new file mode 100644 index 00000000..2a0f9a7f --- /dev/null +++ b/src-tauri/bindings/InstallType.ts @@ -0,0 +1,3 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type InstallType = "STEAM" | "ORIGIN" | "EAPLAY" | "UNKNOWN"; \ No newline at end of file diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 9e812683..a7827a44 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -457,7 +457,8 @@ mod platform_specific; #[cfg(target_os = "linux")] use platform_specific::linux; -#[derive(Serialize, Deserialize, Debug, Clone)] +#[derive(Serialize, Deserialize, Debug, Clone, TS)] +#[ts(export)] pub enum InstallType { STEAM, ORIGIN, -- cgit v1.2.3