Remove no longer needed ts-ignore comments, fix typos

Change-type: patch
This commit is contained in:
Alexis Svinartchouk 2020-04-01 19:42:16 +02:00
parent d63df5a156
commit 82a3c37c16
5 changed files with 2 additions and 8 deletions

View File

@ -173,7 +173,7 @@ export function DriveSelectorModal({ close }: { close: () => void }) {
<li <li
key={`item-${drive.displayName}`} key={`item-${drive.displayName}`}
className="list-group-item" className="list-group-item"
// @ts-ignore (FIXME: not a valid <li> attribute but used by css rule) // @ts-ignore (FIXME: not a valid <li> attribute but used by css rule)
disabled={!isDriveValid(drive, selectionState.getImage())} disabled={!isDriveValid(drive, selectionState.getImage())}
onDoubleClick={() => selectDriveAndClose(drive)} onDoubleClick={() => selectDriveAndClose(drive)}
onClick={() => toggleDrive(drive)} onClick={() => toggleDrive(drive)}
@ -243,7 +243,7 @@ export function DriveSelectorModal({ close }: { close: () => void }) {
{isDriveValid(drive, selectionState.getImage()) && ( {isDriveValid(drive, selectionState.getImage()) && (
<span <span
className="list-group-item-section tick tick--success" className="list-group-item-section tick tick--success"
// @ts-ignore (FIXME: not a valid <span> attribute but used by css rule) // @ts-ignore (FIXME: not a valid <span> attribute but used by css rule)
disabled={!selectionState.isDriveSelected(drive.device)} disabled={!selectionState.isDriveSelected(drive.device)}
></span> ></span>
)} )}

View File

@ -137,7 +137,6 @@ export const SettingsModal: any = styled(
setting, setting,
value, value,
dangerous, dangerous,
// @ts-ignore
applicationSessionUuid: store.getState().toJS().applicationSessionUuid, applicationSessionUuid: store.getState().toJS().applicationSessionUuid,
}); });

View File

@ -185,7 +185,6 @@ export function performWrite(
cancelled = true; cancelled = true;
}); });
// @ts-ignore
ipc.server.on('state', onProgress); ipc.server.on('state', onProgress);
ipc.server.on('ready', (_data, socket) => { ipc.server.on('ready', (_data, socket) => {

View File

@ -46,7 +46,6 @@ function getDrivesTitle() {
const drives = selectionState.getSelectedDrives(); const drives = selectionState.getSelectedDrives();
if (drives.length === 1) { if (drives.length === 1) {
// @ts-ignore
return drives[0].description || 'Untitled Device'; return drives[0].description || 'Untitled Device';
} }

View File

@ -97,7 +97,6 @@ async function writeAndValidate(
): Promise<WriteResult> { ): Promise<WriteResult> {
let innerSource: sdk.sourceDestination.SourceDestination = await source.getInnerSource(); let innerSource: sdk.sourceDestination.SourceDestination = await source.getInnerSource();
if (trim && (await innerSource.canRead())) { if (trim && (await innerSource.canRead())) {
// @ts-ignore FIXME: ts thinks that SparseReadStream can't be assigned to SparseReadable (which it implements)
innerSource = new sdk.sourceDestination.ConfiguredSource({ innerSource = new sdk.sourceDestination.ConfiguredSource({
source: innerSource, source: innerSource,
shouldTrimPartitions: trim, shouldTrimPartitions: trim,
@ -109,7 +108,6 @@ async function writeAndValidate(
bytesWritten, bytesWritten,
} = await sdk.multiWrite.pipeSourceToDestinations( } = await sdk.multiWrite.pipeSourceToDestinations(
innerSource, innerSource,
// @ts-ignore FIXME: ts thinks that BlockWriteStream can't be assigned to WritableStream (which it implements)
destinations, destinations,
onFail, onFail,
onProgress, onProgress,
@ -231,7 +229,6 @@ ipc.connectTo(IPC_SERVER_ID, () => {
}); });
try { try {
const results = await writeAndValidate( const results = await writeAndValidate(
// @ts-ignore FIXME: ts thinks that SparseWriteStream can't be assigned to SparseWritable (which it implements)
source, source,
dests, dests,
options.validateWriteOnSuccess, options.validateWriteOnSuccess,