mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-27 21:26:38 +00:00
Add more typings & refactor code accordingly
Change-type: patch Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
This commit is contained in:
parent
c6cd421f17
commit
2e3978b3c9
@ -72,24 +72,24 @@ export function getImage(): SourceMetadata | undefined {
|
|||||||
return store.getState().toJS().selection.image;
|
return store.getState().toJS().selection.image;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getImagePath() {
|
export function getImagePath(): string | undefined {
|
||||||
return getImage()?.path;
|
return store.getState().toJS().selection.image?.path;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getImageSize() {
|
export function getImageSize(): number | undefined {
|
||||||
return getImage()?.size;
|
return store.getState().toJS().selection.image?.size;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getImageName() {
|
export function getImageName(): string | undefined {
|
||||||
return getImage()?.name;
|
return store.getState().toJS().selection.image?.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getImageLogo() {
|
export function getImageLogo(): string | undefined {
|
||||||
return getImage()?.logo;
|
return store.getState().toJS().selection.image?.logo;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getImageSupportUrl() {
|
export function getImageSupportUrl(): string | undefined {
|
||||||
return getImage()?.supportUrl;
|
return store.getState().toJS().selection.image?.supportUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user