Skip to content

Commit a0eb2c7

Browse files
committed
fix(types): allow all functions to pass as modify callback
1 parent c8c18b9 commit a0eb2c7

File tree

7 files changed

+96
-4
lines changed

7 files changed

+96
-4
lines changed

.idea/codeStyles/Project.xml

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/pptx-automizer.iml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/classes/slide.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export class Slide implements ISlide {
178178
*/
179179
modifyElement(
180180
selector: string,
181-
callback: ShapeModificationCallback | ShapeModificationCallback[],
181+
callback: ShapeModificationCallback | ShapeModificationCallback[] | Function | Function[],
182182
): this {
183183
const presName = this.sourceTemplate.name;
184184
const slideNumber = this.sourceNumber;
@@ -204,7 +204,7 @@ export class Slide implements ISlide {
204204
presName: string,
205205
slideNumber: number,
206206
selector: string,
207-
callback?: ShapeModificationCallback | ShapeModificationCallback[],
207+
callback?: ShapeModificationCallback | ShapeModificationCallback[] | Function | Function[],
208208
): this {
209209
return this.addElementToModificationsList(
210210
presName,
@@ -230,7 +230,7 @@ export class Slide implements ISlide {
230230
slideNumber: number,
231231
selector: string,
232232
mode: string,
233-
callback?: ShapeModificationCallback | ShapeModificationCallback[],
233+
callback?: ShapeModificationCallback | ShapeModificationCallback[] | Function | Function[],
234234
): this {
235235
this.importElements.push({
236236
presName,

src/types/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export type ImportElement = {
4343
slideNumber: number;
4444
selector: string;
4545
mode: string;
46-
callback?: ShapeModificationCallback | ShapeModificationCallback[];
46+
callback?: ShapeModificationCallback | ShapeModificationCallback[] | Function | Function[]
4747
};
4848
export type ImportedElement = {
4949
mode: string;

0 commit comments

Comments
 (0)