Skip to content

Commit

Permalink
Merge pull request #45 from benrbray/benrbray/gh30/update-typescript
Browse files Browse the repository at this point in the history
[dependencies] update typescript@5
  • Loading branch information
benrbray authored Apr 29, 2023
2 parents c25cbbb + 95b5fd0 commit 133800e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
"ts-node": "^10.9.1",
"tsconfig-paths": "^3.14.2",
"tsconfig-paths-webpack-plugin": "^4.0.0",
"typescript": "4.4",
"typescript": "^5.0.4",
"url-loader": "^4.1.1",
"webpack": "^5.76.1",
"webpack-cli": "^5.0.1",
Expand Down
11 changes: 9 additions & 2 deletions src/main/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ export default class NoteworthyApp extends EventEmitter {
* simple enough for us to manage dependencies manually.
*/
makeHandlers(): MainIpcHandlers {
console.log("app :: makeHandlers");
console.log("app :: makeHandlers :: pluginService", this._pluginService);
console.log("app :: makeHandlers :: themeService", this._themeService);
// handlers with no dependencies
let lifecycleHandlers = new MainIpc_LifecycleHandlers(this);
let shellHandlers = new MainIpc_ShellHandlers();
Expand Down Expand Up @@ -186,13 +189,17 @@ export default class NoteworthyApp extends EventEmitter {
channel: C,
name: T,
/** @todo now we only take the FIRST parameter of each handler -- should we take them all? */
data?: Parameters<MainIpcHandlers[C][T]>[0]
data?: unknown //Parameters<MainIpcHandlers[C][T]>[0]
) {
/** @remark (6/25/20) cannot properly type-check this call
* without support for "correlated record types", see e.g.
* (https://github.com/Microsoft/TypeScript/issues/30581)
*/
return this._eventHandlers[channel][name](data as any);

// TODO (Ben @ 2023/04/29) workaround to breaking change in TypeScript 4.5
// (https://github.com/benrbray/noteworthy/issues/30)
// @ts-ignore
return this._eventHandlers[channel][name](data)
}

async handleFileTreeChanged(fileTree: IDirEntryMeta[]): Promise<void> {
Expand Down

0 comments on commit 133800e

Please sign in to comment.