From bca0cdcbf8a2380186d8e830615f7406252993e6 Mon Sep 17 00:00:00 2001 From: Philippe Martin Date: Mon, 30 Sep 2024 10:30:55 +0200 Subject: [PATCH] feat: define HostConfig.Devices with a known type in extension-api.d.ts (#9136) * feat: define HostConfig.Devices with a known type in extension-api.d.ts Signed-off-by: Philippe Martin * Apply suggestions from code review Co-authored-by: Florent BENOIT Signed-off-by: Philippe Martin --------- Signed-off-by: Philippe Martin Co-authored-by: Florent BENOIT --- packages/extension-api/src/extension-api.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/extension-api/src/extension-api.d.ts b/packages/extension-api/src/extension-api.d.ts index f188c32704578..ebf69057e4533 100644 --- a/packages/extension-api/src/extension-api.d.ts +++ b/packages/extension-api/src/extension-api.d.ts @@ -2600,6 +2600,12 @@ declare module '@podman-desktop/api' { Options?: { [key: string]: string }; } + interface DeviceMapping { + CgroupPermissions: string; + PathInContainer: string; + PathOnHost: string; + } + interface HostConfig { AutoRemove?: boolean; Binds?: string[]; @@ -2653,7 +2659,7 @@ declare module '@podman-desktop/api' { CpuQuota?: number; CpusetCpus?: string; CpusetMems?: string; - Devices?: unknown; + Devices?: DeviceMapping[]; DeviceCgroupRules?: string[]; DeviceRequests?: DeviceRequest[]; DiskQuota?: number;