mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-19 13:47:54 +00:00
Improve types used by application-manager
This commit is contained in:
parent
968e2ba0fb
commit
2a50a4262d
@ -129,7 +129,7 @@ interface CompositionCallbacks {
|
||||
fetchStart: () => void;
|
||||
fetchEnd: () => void;
|
||||
fetchTime: (time: number) => void;
|
||||
stateReport: (state: Dictionary<unknown>) => Promise<void>;
|
||||
stateReport: (state: Dictionary<unknown>) => boolean;
|
||||
bestDeltaSource: (image: Image, available: Image[]) => string | null;
|
||||
}
|
||||
|
||||
|
@ -465,7 +465,10 @@ export class Images extends (EventEmitter as new () => ImageEventEmitter) {
|
||||
}
|
||||
}
|
||||
|
||||
public static isSameImage(image1: Image, image2: Image): boolean {
|
||||
public static isSameImage(
|
||||
image1: Pick<Image, 'name'>,
|
||||
image2: Pick<Image, 'name'>,
|
||||
): boolean {
|
||||
return (
|
||||
image1.name === image2.name ||
|
||||
Images.hasSameDigest(image1.name, image2.name)
|
||||
|
4
src/device-api/common.d.ts
vendored
4
src/device-api/common.d.ts
vendored
@ -25,6 +25,6 @@ declare function serviceAction(
|
||||
action: string,
|
||||
serviceId: number,
|
||||
current: Service,
|
||||
target: Service,
|
||||
options: any,
|
||||
target?: Service,
|
||||
options?: any,
|
||||
): ServiceAction;
|
||||
|
@ -45,7 +45,7 @@ const DELTA_TOKEN_TIMEOUT = 10 * 60 * 1000;
|
||||
export class DockerUtils extends DockerToolbelt {
|
||||
public dockerProgress: DockerProgress;
|
||||
|
||||
public constructor(opts: Dockerode.DockerOptions) {
|
||||
public constructor(opts?: Dockerode.DockerOptions) {
|
||||
super(opts);
|
||||
this.dockerProgress = new DockerProgress({ dockerToolbelt: this });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user