Skip to content

Commit

Permalink
fix(core): fix a type mismatch
Browse files Browse the repository at this point in the history
Summary: fix a type mismatch (likely due to changes in newer version of node modules ) so we don't need to use `any` type casting

Reviewed By: tulga1970

Differential Revision: D49710260

fbshipit-source-id: ac63013551b330a382e000ad28f1aaadd7d89e02
  • Loading branch information
JacksonGL authored and facebook-github-bot committed Sep 29, 2023
1 parent 56899fb commit 18b23d5
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/e2e/src/E2EInteractionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,10 @@ export default class E2EInteractionManager {
lastChunk = data.chunk;
};

// TODO: update type definition
const progressHandler = (data: {
done: number;
total: number;
finished: boolean;
finished?: boolean;
}) => {
const percent = ((100 * data.done) / data.total) | 0;
if (!config.isContinuousTest) {
Expand All @@ -407,10 +406,7 @@ export default class E2EInteractionManager {
};

session.on('HeapProfiler.addHeapSnapshotChunk', dataHandler);
session.on(
'HeapProfiler.reportHeapSnapshotProgress',
progressHandler as AnyValue,
);
session.on('HeapProfiler.reportHeapSnapshotProgress', progressHandler);

// start taking heap snapshot
await session.send('HeapProfiler.takeHeapSnapshot', {
Expand All @@ -422,7 +418,7 @@ export default class E2EInteractionManager {
session.removeListener('HeapProfiler.addHeapSnapshotChunk', dataHandler);
session.removeListener(
'HeapProfiler.reportHeapSnapshotProgress',
progressHandler as AnyValue,
progressHandler,
);
writeStream.end();
}
Expand Down

0 comments on commit 18b23d5

Please sign in to comment.