Skip to content

Commit

Permalink
Fix type definition of TheiaAppFactory (#13799)
Browse files Browse the repository at this point in the history
Ensure that the `TheiaAppFactory` type does  match the constructor function of TheiaApp.
`InitialWorkspace` is required in the TheiaApp constructor butwas optional in `TheiaAppFactory`
This ensures that (sub)classes of TheiaApp can properly be used as app factory without type casting

Contributed on behalf of STMicroelectronics
  • Loading branch information
tortmayr authored Jun 11, 2024
1 parent d50029f commit 8d2d0c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/playwright/src/theia-app-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { TheiaWorkspace } from './theia-workspace';
import { OSUtil } from './util';

export interface TheiaAppFactory<T extends TheiaApp> {
new(page: Page, initialWorkspace?: TheiaWorkspace, isElectron?: boolean): T;
new(page: Page, initialWorkspace: TheiaWorkspace, isElectron?: boolean): T;
}

// TODO this is just a sketch, we need a proper way to configure tests and pass this configuration to the `TheiaAppLoader`:
Expand Down

0 comments on commit 8d2d0c6

Please # to comment.