mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 15:27:17 +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;
|
||||
}
|
||||
|
||||
export function getImagePath() {
|
||||
return getImage()?.path;
|
||||
export function getImagePath(): string | undefined {
|
||||
return store.getState().toJS().selection.image?.path;
|
||||
}
|
||||
|
||||
export function getImageSize() {
|
||||
return getImage()?.size;
|
||||
export function getImageSize(): number | undefined {
|
||||
return store.getState().toJS().selection.image?.size;
|
||||
}
|
||||
|
||||
export function getImageName() {
|
||||
return getImage()?.name;
|
||||
export function getImageName(): string | undefined {
|
||||
return store.getState().toJS().selection.image?.name;
|
||||
}
|
||||
|
||||
export function getImageLogo() {
|
||||
return getImage()?.logo;
|
||||
export function getImageLogo(): string | undefined {
|
||||
return store.getState().toJS().selection.image?.logo;
|
||||
}
|
||||
|
||||
export function getImageSupportUrl() {
|
||||
return getImage()?.supportUrl;
|
||||
export function getImageSupportUrl(): string | undefined {
|
||||
return store.getState().toJS().selection.image?.supportUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user