diff --git a/CHANGELOG.md b/CHANGELOG.md
index b75ca479eca..ae7bb98cc9e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
## [next]
+- chore(TS): minor changes to typescript notation to be compatible with a 5.3.3 [#9725](https://github.com/fabricjs/fabric.js/pull/9725)
- fix(InteractiveObject): "borderOpacityWhenMoving" does not take effect on the child shapes within the group [#9374](https://github.com/fabricjs/fabric.js/issues/9734)
- fix(SVGParser): Consider the transformMatrix of the clipPath owner as part of the clipPath trasnformation [#9750](https://github.com/fabricjs/fabric.js/pull/9750)
- fix(StaticCanvas): setDimensions not requesting a render if options are not passed [#9710](https://github.com/fabricjs/fabric.js/pull/9710)
diff --git a/package-lock.json b/package-lock.json
index b1a5cfd6b1a..8683a526e38 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -56,8 +56,6 @@
"source-map-support": "^0.5.21",
"testem": "^3.8.0",
"tslib": "^2.4.1",
- "typedoc": "^0.25.3",
- "typedoc-plugin-markdown": "^3.17.0",
"typescript": "^4.9.4",
"v8-to-istanbul": "^9.1.0"
},
@@ -3837,12 +3835,6 @@
"node": ">=8"
}
},
- "node_modules/ansi-sequence-parser": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz",
- "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==",
- "dev": true
- },
"node_modules/ansi-styles": {
"version": "3.2.1",
"dev": true,
@@ -9269,12 +9261,6 @@
"node": ">=6"
}
},
- "node_modules/jsonc-parser": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz",
- "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==",
- "dev": true
- },
"node_modules/jsonfile": {
"version": "6.1.0",
"dev": true,
@@ -9560,11 +9546,6 @@
"node": ">=10"
}
},
- "node_modules/lunr": {
- "version": "2.3.9",
- "dev": true,
- "license": "MIT"
- },
"node_modules/make-dir": {
"version": "3.1.0",
"devOptional": true,
@@ -9596,18 +9577,6 @@
"tmpl": "1.0.5"
}
},
- "node_modules/marked": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
- "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
- "dev": true,
- "bin": {
- "marked": "bin/marked.js"
- },
- "engines": {
- "node": ">= 12"
- }
- },
"node_modules/media-typer": {
"version": "0.3.0",
"dev": true,
@@ -11250,18 +11219,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/shiki": {
- "version": "0.14.3",
- "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.3.tgz",
- "integrity": "sha512-U3S/a+b0KS+UkTyMjoNojvTgrBHjgp7L6ovhFVZsXmBGnVdQ4K4U9oK0z63w538S91ATngv1vXigHCSWOwnr+g==",
- "dev": true,
- "dependencies": {
- "ansi-sequence-parser": "^1.1.0",
- "jsonc-parser": "^3.2.0",
- "vscode-oniguruma": "^1.7.0",
- "vscode-textmate": "^8.0.0"
- }
- },
"node_modules/side-channel": {
"version": "1.0.4",
"dev": true,
@@ -11954,63 +11911,6 @@
"is-typedarray": "^1.0.0"
}
},
- "node_modules/typedoc": {
- "version": "0.25.3",
- "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.3.tgz",
- "integrity": "sha512-Ow8Bo7uY1Lwy7GTmphRIMEo6IOZ+yYUyrc8n5KXIZg1svpqhZSWgni2ZrDhe+wLosFS8yswowUzljTAV/3jmWw==",
- "dev": true,
- "dependencies": {
- "lunr": "^2.3.9",
- "marked": "^4.3.0",
- "minimatch": "^9.0.3",
- "shiki": "^0.14.1"
- },
- "bin": {
- "typedoc": "bin/typedoc"
- },
- "engines": {
- "node": ">= 16"
- },
- "peerDependencies": {
- "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x"
- }
- },
- "node_modules/typedoc-plugin-markdown": {
- "version": "3.17.0",
- "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.17.0.tgz",
- "integrity": "sha512-+uh5fHNfNSGdUxae0FWOuJ8Xu9Sl08jkdshOg6dilAqN/ZXmYsUFFDKw70fYfiGxdCLvpUuyr9FYO+WAa2lHeA==",
- "dev": true,
- "dependencies": {
- "handlebars": "^4.7.7"
- },
- "peerDependencies": {
- "typedoc": ">=0.24.0"
- }
- },
- "node_modules/typedoc/node_modules/brace-expansion": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
- "dev": true,
- "dependencies": {
- "balanced-match": "^1.0.0"
- }
- },
- "node_modules/typedoc/node_modules/minimatch": {
- "version": "9.0.3",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
- "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
- "dev": true,
- "dependencies": {
- "brace-expansion": "^2.0.1"
- },
- "engines": {
- "node": ">=16 || 14 >=14.17"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
"node_modules/typescript": {
"version": "4.9.4",
"dev": true,
@@ -12201,18 +12101,6 @@
"node": ">= 0.8"
}
},
- "node_modules/vscode-oniguruma": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz",
- "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==",
- "dev": true
- },
- "node_modules/vscode-textmate": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz",
- "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==",
- "dev": true
- },
"node_modules/w3c-xmlserializer": {
"version": "4.0.0",
"devOptional": true,
@@ -15101,12 +14989,6 @@
"version": "5.0.1",
"devOptional": true
},
- "ansi-sequence-parser": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz",
- "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==",
- "dev": true
- },
"ansi-styles": {
"version": "3.2.1",
"dev": true,
@@ -18852,12 +18734,6 @@
"version": "2.2.3",
"dev": true
},
- "jsonc-parser": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz",
- "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==",
- "dev": true
- },
"jsonfile": {
"version": "6.1.0",
"dev": true,
@@ -19067,10 +18943,6 @@
"yallist": "^4.0.0"
}
},
- "lunr": {
- "version": "2.3.9",
- "dev": true
- },
"make-dir": {
"version": "3.1.0",
"devOptional": true,
@@ -19093,12 +18965,6 @@
"tmpl": "1.0.5"
}
},
- "marked": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
- "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
- "dev": true
- },
"media-typer": {
"version": "0.3.0",
"dev": true
@@ -20150,18 +20016,6 @@
"version": "0.1.1",
"dev": true
},
- "shiki": {
- "version": "0.14.3",
- "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.3.tgz",
- "integrity": "sha512-U3S/a+b0KS+UkTyMjoNojvTgrBHjgp7L6ovhFVZsXmBGnVdQ4K4U9oK0z63w538S91ATngv1vXigHCSWOwnr+g==",
- "dev": true,
- "requires": {
- "ansi-sequence-parser": "^1.1.0",
- "jsonc-parser": "^3.2.0",
- "vscode-oniguruma": "^1.7.0",
- "vscode-textmate": "^8.0.0"
- }
- },
"side-channel": {
"version": "1.0.4",
"dev": true,
@@ -20645,47 +20499,6 @@
"is-typedarray": "^1.0.0"
}
},
- "typedoc": {
- "version": "0.25.3",
- "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.3.tgz",
- "integrity": "sha512-Ow8Bo7uY1Lwy7GTmphRIMEo6IOZ+yYUyrc8n5KXIZg1svpqhZSWgni2ZrDhe+wLosFS8yswowUzljTAV/3jmWw==",
- "dev": true,
- "requires": {
- "lunr": "^2.3.9",
- "marked": "^4.3.0",
- "minimatch": "^9.0.3",
- "shiki": "^0.14.1"
- },
- "dependencies": {
- "brace-expansion": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
- "dev": true,
- "requires": {
- "balanced-match": "^1.0.0"
- }
- },
- "minimatch": {
- "version": "9.0.3",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
- "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
- "dev": true,
- "requires": {
- "brace-expansion": "^2.0.1"
- }
- }
- }
- },
- "typedoc-plugin-markdown": {
- "version": "3.17.0",
- "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.17.0.tgz",
- "integrity": "sha512-+uh5fHNfNSGdUxae0FWOuJ8Xu9Sl08jkdshOg6dilAqN/ZXmYsUFFDKw70fYfiGxdCLvpUuyr9FYO+WAa2lHeA==",
- "dev": true,
- "requires": {
- "handlebars": "^4.7.7"
- }
- },
"typescript": {
"version": "4.9.4",
"dev": true
@@ -20796,18 +20609,6 @@
"version": "1.1.2",
"dev": true
},
- "vscode-oniguruma": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz",
- "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==",
- "dev": true
- },
- "vscode-textmate": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz",
- "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==",
- "dev": true
- },
"w3c-xmlserializer": {
"version": "4.0.0",
"devOptional": true,
diff --git a/package.json b/package.json
index a5f17753152..481bce5e696 100644
--- a/package.json
+++ b/package.json
@@ -122,8 +122,6 @@
"source-map-support": "^0.5.21",
"testem": "^3.8.0",
"tslib": "^2.4.1",
- "typedoc": "^0.25.3",
- "typedoc-plugin-markdown": "^3.17.0",
"typescript": "^4.9.4",
"v8-to-istanbul": "^9.1.0"
},
diff --git a/src/Pattern/Pattern.ts b/src/Pattern/Pattern.ts
index e6e66517433..169564ebb08 100644
--- a/src/Pattern/Pattern.ts
+++ b/src/Pattern/Pattern.ts
@@ -174,16 +174,24 @@ export class Pattern {
patternWidth =
repeat === 'repeat-y' || repeat === 'no-repeat'
? 1 + Math.abs(patternOffsetX || 0)
- : ifNaN((patternSource.width as number) / width, 0),
+ : ifNaN(
+ ((patternSource as HTMLImageElement).width as number) / width,
+ 0
+ ),
patternHeight =
repeat === 'repeat-x' || repeat === 'no-repeat'
? 1 + Math.abs(patternOffsetY || 0)
- : ifNaN((patternSource.height as number) / height, 0);
+ : ifNaN(
+ ((patternSource as HTMLImageElement).height as number) / height,
+ 0
+ );
return [
``,
- ``,
``,
'',
diff --git a/src/canvas/StaticCanvas.ts b/src/canvas/StaticCanvas.ts
index c0b51043553..7ca095dbbdb 100644
--- a/src/canvas/StaticCanvas.ts
+++ b/src/canvas/StaticCanvas.ts
@@ -1230,11 +1230,11 @@ export class StaticCanvas<
filler.offsetY - finalHeight / 2
}" width="${
(repeat === 'repeat-y' || repeat === 'no-repeat') && isPattern(filler)
- ? filler.source.width
+ ? (filler.source as HTMLImageElement).width
: finalWidth
}" height="${
(repeat === 'repeat-x' || repeat === 'no-repeat') && isPattern(filler)
- ? filler.source.height
+ ? (filler.source as HTMLImageElement).height
: finalHeight
}" fill="url(#SVGID_${filler.id})">\n`
);
diff --git a/src/filters/WebGLFilterBackend.ts b/src/filters/WebGLFilterBackend.ts
index 611c7c63b03..f0dfd9df9e3 100644
--- a/src/filters/WebGLFilterBackend.ts
+++ b/src/filters/WebGLFilterBackend.ts
@@ -285,8 +285,8 @@ export class WebGLFilterBackend {
} else {
const texture = this.createTexture(
this.gl,
- textureImageSource.width,
- textureImageSource.height,
+ (textureImageSource as HTMLImageElement).width,
+ (textureImageSource as HTMLImageElement).height,
textureImageSource,
filter
);
diff --git a/src/shapes/Image.ts b/src/shapes/Image.ts
index 184d5e8783c..b7e4c502d02 100644
--- a/src/shapes/Image.ts
+++ b/src/shapes/Image.ts
@@ -602,7 +602,8 @@ export class FabricImage<
ctx: CanvasRenderingContext2D
) {
ctx.imageSmoothingEnabled = this.imageSmoothing;
- // @ts-expect-error TS doesn't respect this type casting
+ // cant use ts-expect-error because of ts 5.3 cross check
+ // @ts-ignore TS doesn't respect this type casting
super.drawCacheOnCanvas(ctx);
}
diff --git a/src/shapes/Text/TextSVGExportMixin.ts b/src/shapes/Text/TextSVGExportMixin.ts
index a01b260efc7..b529553f3cb 100644
--- a/src/shapes/Text/TextSVGExportMixin.ts
+++ b/src/shapes/Text/TextSVGExportMixin.ts
@@ -296,7 +296,8 @@ export class TextSVGExportMixin extends FabricObjectSVGExportMixin {
* @return {String}
*/
getSvgStyles(this: TextSVGExportMixin & FabricText, skipShadow?: boolean) {
- // @ts-expect-error TS doesn't respect this type casting
+ // cant use ts-expect-error because of ts 5.3 cross check
+ // @ts-ignore TS doesn't respect this type casting
return `${super.getSvgStyles(skipShadow)} white-space: pre;`;
}
diff --git a/src/shapes/Textbox.ts b/src/shapes/Textbox.ts
index 2073c02af2e..2f91768d92b 100644
--- a/src/shapes/Textbox.ts
+++ b/src/shapes/Textbox.ts
@@ -550,7 +550,8 @@ export class Textbox<
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
* @return {Object} object representation of an instance
*/
- // @ts-expect-error TS this typing limitations
+ // cant use ts-expect-error because of ts 5.3 cross check
+ // @ts-ignore TS this typing limitations
toObject<
T extends Omit, keyof SProps>,
K extends keyof T = never
diff --git a/typedoc.config.json b/typedoc.config.json
index 773ff54f742..e1a1a722cf4 100644
--- a/typedoc.config.json
+++ b/typedoc.config.json
@@ -1,6 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "./tsconfig.json",
- "include": ["fabric.ts"],
- "exclude": ["src/**/*.test.ts", "src/**/*.spec.ts"]
+ "exclude": ["dist", "test", "e2e", "src/**/*.test.ts", "src/**/*.spec.ts"]
}
diff --git a/typedoc.json b/typedoc.json
deleted file mode 100644
index a108f5a67c8..00000000000
--- a/typedoc.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- // https://typedoc.org/options/
- "$schema": "https://typedoc.org/schema.json",
- "entryPoints": ["fabric.ts"],
- "out": "docs",
- "excludeExternals": true,
- "tsconfig": "typedoc.config.json",
- "hideBreadcrumbs": "true",
- "hideInPageTOC": "true",
- "publicPath": "/apidocs/",
- "plugin": ["typedoc-plugin-markdown"]
-}