Skip to content

Commit 2fc9f63

Browse files
committed
fix(types): fix types for ShapeModificationCallback / replaceText
1 parent 6f44f12 commit 2fc9f63

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

src/classes/shape.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export class Shape {
198198

199199
applyCallbacks(
200200
callbacks: ShapeModificationCallback[],
201-
element: XmlElement | XmlDocument,
201+
element: XmlElement,
202202
arg1?: XmlElement | XmlDocument,
203203
arg2?: Workbook,
204204
): void {

src/helper/modify-chart-helper.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,7 @@ export default class ModifyChartHelper {
129129
*/
130130
static setChartCombo =
131131
(data: ChartData) =>
132-
(
133-
element: XmlDocument | XmlElement,
134-
chart?: XmlDocument,
135-
workbook?: Workbook,
136-
): void => {
132+
(element: XmlElement, chart?: XmlDocument, workbook?: Workbook): void => {
137133
const slots = [] as ChartSlot[];
138134

139135
slots.push({

src/types/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export type ShapeTargetType = 'slide' | 'slideMaster' | 'slideLayout';
1414
export type SourceIdentifier = number | string;
1515
export type SlideModificationCallback = (document: XmlDocument) => void;
1616
export type ShapeModificationCallback = (
17-
XmlDocument: XmlDocument | XmlElement,
17+
element: XmlElement,
1818
arg1?: XmlDocument | XmlElement,
1919
arg2?: Workbook,
2020
) => void;

0 commit comments

Comments
 (0)