Skip to content

Commit

Permalink
feat: define HostConfig.Devices with a known type in extension-api.d.…
Browse files Browse the repository at this point in the history
…ts (podman-desktop#9136)

* feat: define HostConfig.Devices with a known type in extension-api.d.ts
Signed-off-by: Philippe Martin <[email protected]>

* Apply suggestions from code review

Co-authored-by: Florent BENOIT <[email protected]>
Signed-off-by: Philippe Martin <[email protected]>

---------

Signed-off-by: Philippe Martin <[email protected]>
Co-authored-by: Florent BENOIT <[email protected]>
  • Loading branch information
feloy and benoitf authored Sep 30, 2024
1 parent e470857 commit bca0cdc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/extension-api/src/extension-api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit bca0cdc

Please sign in to comment.