diff --git a/package-lock.json b/package-lock.json index e4c7941fd8..c48f8e2c63 100644 --- a/package-lock.json +++ b/package-lock.json @@ -268,7 +268,7 @@ "terser-webpack-plugin": "^5.3.10", "ts-loader": "^9.5.1", "type-fest": "^4.26.1", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "typescript-plugin-css-modules": "^5.1.0", "webpack": "^5.94.0", "webpack-build-notifier": "^3.1.0", @@ -28308,9 +28308,9 @@ "dev": true }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index 92ff910023..b6708fc9a4 100644 --- a/package.json +++ b/package.json @@ -293,7 +293,7 @@ "terser-webpack-plugin": "^5.3.10", "ts-loader": "^9.5.1", "type-fest": "^4.26.1", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "typescript-plugin-css-modules": "^5.1.0", "webpack": "^5.94.0", "webpack-build-notifier": "^3.1.0", diff --git a/src/bricks/effects/clipboard.test.ts b/src/bricks/effects/clipboard.test.ts index 4723c37448..448036d05d 100644 --- a/src/bricks/effects/clipboard.test.ts +++ b/src/bricks/effects/clipboard.test.ts @@ -38,6 +38,8 @@ const SMALL_RED_DOT_URI = }; class ClipboardItemFake implements ClipboardItem { + presentationStyle: PresentationStyle = "unspecified"; + constructor( private readonly items: Record< string, @@ -45,6 +47,10 @@ class ClipboardItemFake implements ClipboardItem { >, ) {} + static supports(type: string): boolean { + return true; + } + async getType(type: string): Promise { return this.items[type] as Blob; } diff --git a/src/pageEditor/hooks/useCheckModStarterBrickInvariants.test.ts b/src/pageEditor/hooks/useCheckModStarterBrickInvariants.test.ts index d294055463..4d9d8f5ee8 100644 --- a/src/pageEditor/hooks/useCheckModStarterBrickInvariants.test.ts +++ b/src/pageEditor/hooks/useCheckModStarterBrickInvariants.test.ts @@ -41,8 +41,7 @@ import { let starterBrickCount = 0; function newStarterBrickId(): InnerDefinitionRef { - // eslint-disable-next-line no-constant-binary-expression -- false positive - return `starterBrick${starterBrickCount++ ?? ""}` as InnerDefinitionRef; + return `starterBrick${starterBrickCount++}` as InnerDefinitionRef; } describe("useCheckModStarterBrickInvariants", () => { diff --git a/src/pageEditor/store/editor/selectGetCleanComponentsAndDirtyFormStatesForMod.test.ts b/src/pageEditor/store/editor/selectGetCleanComponentsAndDirtyFormStatesForMod.test.ts index ae00e340e3..e4fe15aeaa 100644 --- a/src/pageEditor/store/editor/selectGetCleanComponentsAndDirtyFormStatesForMod.test.ts +++ b/src/pageEditor/store/editor/selectGetCleanComponentsAndDirtyFormStatesForMod.test.ts @@ -35,8 +35,7 @@ import { starterBrickDefinitionFactory } from "@/testUtils/factories/modDefiniti let starterBrickCount = 0; function newStarterBrickId(): InnerDefinitionRef { - // eslint-disable-next-line no-constant-binary-expression -- false positive - return `starterBrick${starterBrickCount++ ?? ""}` as InnerDefinitionRef; + return `starterBrick${starterBrickCount++}` as InnerDefinitionRef; } describe("selectGetCleanComponentsAndDirtyFormStatesForMod", () => { diff --git a/tsconfig.json b/tsconfig.json index 1efff9a2f6..758920b7f9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,6 +9,7 @@ "resolveJsonModule": true, "baseUrl": ".", "outDir": null, + "declaration": false, // TODO: Drop these lines to make TS stricter https://github.com/pixiebrix/pixiebrix-extension/issues/775 "strictFunctionTypes": false,