Skip to content

Commit 3f74a73

Browse files
authored
Merge pull request #9 from motiondeveloper/dev
add call signature to effects (fixes #8)
2 parents c568518 + 071f489 commit 3f74a73

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,16 @@ export class Effect {
851851
}
852852
}
853853

854+
// Duplicate declaration as an interface, to add a call
855+
// signature for effects. This enables layer.effect("")("") syntax
856+
export interface Effect {
857+
/**
858+
* @returns A property within an effect, e.g. `"Slider"`
859+
* @param nameOrIndex The name or index of the property to retrieve
860+
*/
861+
(nameOrIndex: string | number): Property<string>;
862+
}
863+
854864
export class Mask {
855865
/**
856866
* The opacity value of a mask as a percentage.

0 commit comments

Comments
 (0)