Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

chore(typescript): adapt codebase to TypeScript version 5.3

白熱798279afd147
diff --git a/packages/engine-formula/src/functions/lookup/offset/index.ts b/packages/engine-formula/src/functions/lookup/offset/index.ts
index a15ee4fa9c..31c7238206 100644
--- a/packages/engine-formula/src/functions/lookup/offset/index.ts
+++ b/packages/engine-formula/src/functions/lookup/offset/index.ts
@@ -142,7 +142,7 @@ export class Offset extends BaseFunction {
}
// Ensure that the callback function returns a BaseValueObject
- return this._handleSingleObject(reference, rowsValue, columnsValue, heightValue, widthValue, true) as BaseValueObject;
+ return this._handleSingleObject(reference as BaseReferenceObject, rowsValue, columnsValue, heightValue, widthValue, true) as BaseValueObject;
});
}
diff --git a/packages/engine-render/src/context.ts b/packages/engine-render/src/context.ts
index 8a102b18b6..2f66c2c83f 100644
--- a/packages/engine-render/src/context.ts
+++ b/packages/engine-render/src/context.ts
@@ -206,46 +206,56 @@ export class UniverRenderingContext2D implements CanvasRenderingContext2D {
// fontStretch: CanvasFontStretch;
get fontStretch() {
+ // @ts-ignore
return this._context.fontStretch;
}
set fontStretch(val: CanvasFontStretch) {
+ // @ts-ignore
this._context.fontStretch = val;
}
// fontVariantCaps: CanvasFontVariantCaps;
get fontVariantCaps() {
+ // @ts-ignore
return this._context.fontVariantCaps;
}
set fontVariantCaps(val: CanvasFontVariantCaps) {
+ // @ts-ignore
this._context.fontVariantCaps = val;
}
// letterSpacing: string;
get letterSpacing() {
+ // @ts-ignore
return this._context.letterSpacing;
}
set letterSpacing(val: string) {
+ // @ts-ignore
this._context.letterSpacing = val;
}
// textRendering: CanvasTextRendering;
get textRendering() {
+ // @ts-ignore
return this._context.textRendering;
}
set textRendering(val: CanvasTextRendering) {
+ // @ts-ignore
this._context.textRendering = val;
}
// wordSpacing: string;
get wordSpacing() {
+ // @ts-ignore
return this._context.wordSpacing;
}
set wordSpacing(val: string) {
+ // @ts-ignore
this._context.wordSpacing = val;
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 1a741d3909..d1f570c721 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -871,7 +871,7 @@ importers:
specifier: ^4.3.2
version: 4.3.2
react-dom:
- specifier: '>=16.9.0'
+ specifier: ^16.9.0 || ^17.0.0 || ^18.0.0
version: 18.2.0([email protected])
react-grid-layout:
specifier: ^1.4.4
@@ -1434,7 +1434,7 @@ importers:
packages/uniscript:
dependencies:
react:
- specifier: '>=16.9.0'
+ specifier: ^16.9.0 || ^17.0.0 || ^18.0.0
version: 18.2.0
devDependencies:
'@types/react':