kunwp1 commented on code in PR #9624:
URL: https://github.com/apache/texera/pull/9624#discussion_r4670790782
##########
frontend/src/app/common/service/computing-unit/computing-unit-status/mock-computing-unit-status.service.ts:
##########
@@ -23,10 +23,6 @@ import { Observable, of } from "rxjs";
@Injectable()
export class MockComputingUnitStatusService {
Review Comment:
Optional: `useClass` accepts any type, which is how these three methods
outlived the real ones. Declaring the stubs as a `Pick` of the real service
makes `tsc` reject a name the service drops:
```ts
type StubbedMethods =
| "getSelectedComputingUnit"
| "getSelectedComputingUnitValue"
| "getAllComputingUnits"
| "selectComputingUnit"
| "refreshComputingUnitList";
@Injectable()
export class MockComputingUnitStatusService implements
Pick<ComputingUnitStatusService, StubbedMethods> {
```
With `"startPolling"` added to the list, `tsc -p src/tsconfig.spec.json`
fails with TS2344.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]