Skip to content

Commit

Permalink
Merge pull request #11414 from keymanapp/chore/web/update-typescript
Browse files Browse the repository at this point in the history
chore(web): updates TypeScript version to 5.4.5
  • Loading branch information
jahorton authored May 30, 2024
2 parents 65a0c22 + e7b0dd1 commit a3c8daa
Show file tree
Hide file tree
Showing 12 changed files with 406 additions and 119 deletions.
1 change: 0 additions & 1 deletion common/models/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "../tsconfig.kmw-worker-base.json",
"compilerOptions": {
"declaration": true,
"module": "none",
"outDir": "build/",
},
"include": ["./*.ts"],
Expand Down
3 changes: 0 additions & 3 deletions common/tools/hextobin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,5 @@
"main": "build/index.js",
"bin": {
"hextobin": "build/hextobin.js"
},
"devDependencies": {
"@types/node": "^18.7.18"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class GestureMatcher<Type, StateToken = any> implements PredecessorMatch<

// We condition on ComplexGestureSource since some unit tests mock the other type without
// instantiating the actual type.
const predecessor = sourceObj instanceof GestureSource<Type> ? null : sourceObj;
const predecessor = sourceObj instanceof GestureSource ? null : sourceObj;
const source = predecessor ? null : (sourceObj as GestureSource<Type>);

this.predecessor = predecessor;
Expand Down
3 changes: 2 additions & 1 deletion common/web/keyboard-processor/src/keyboards/activeLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type Keyboard from "./keyboard.js";
import { TouchLayout } from "@keymanapp/common-types";
import TouchLayoutDefaultHint = TouchLayout.TouchLayoutDefaultHint;
import TouchLayoutFlick = TouchLayout.TouchLayoutFlick;
import TouchLayoutKeySp = TouchLayout.TouchLayoutKeySp;
import { type DeviceSpec } from "@keymanapp/web-utils";

// TS 3.9 changed behavior of getters to make them
Expand Down Expand Up @@ -90,7 +91,7 @@ export class ActiveKeyBase {
layer: string;
displayLayer: string;
nextlayer: string;
sp?: ButtonClass;
sp?: TouchLayoutKeySp;

private _baseKeyEvent: KeyEvent;
isMnemonic: boolean = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import type Keyboard from "./keyboard.js";
export type KLS = {[layerName: string]: string[]};

// The following types provide type definitions for the full JSON format we use for visual keyboard definitions.
export type ButtonClass = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
export type ButtonClass = 0 | 1 | 2 | 3 | 4 | /*5 | 6 | 7 |*/ 8 | 9 | 10;

export interface LayoutLayer extends LayoutLayerBase {
// Post-processing elements.
Expand Down
1 change: 0 additions & 1 deletion common/web/lm-message-types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"declaration": true,
"module": "none",
"outDir": "build/",
"sourceMap": true,
"lib": ["es6"],
Expand Down
18 changes: 1 addition & 17 deletions common/web/sentry-manager/src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../tsconfig.kmw-main-base.json",
"compilerOptions": {

// TODO: These override /tsconfig.base.json settings, and so should be removed if possible,
// but existing code in web/ breaks some of these settinsg
"noImplicitThis": false,
"noImplicitReturns": false,
"noImplicitAny": false,
"strictFunctionTypes": false,
"noUnusedLocals": false,


"allowJs": true,
"allowSyntheticDefaultImports": true,
"baseUrl": "./",
"inlineSources": true,
"lib": ["es6", "dom"],
"module": "es6",
"outDir": "../build/obj",
"rootDir": "./",
"sourceMap": true,
"target": "es5",
"tsBuildInfoFile": "../build/obj/tsconfig.tsbuildinfo",
},

Expand Down
Loading

0 comments on commit a3c8daa

Please sign in to comment.