Skip to content

Commit 55a0049

Browse files
authored
Merge pull request #444 from wellyshen/feature/enhance-types
Refactor(types): enhance the types of event properties
2 parents 75669e1 + 511a817 commit 55a0049

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/use-web-animations.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ declare module "@wellyshen/use-web-animations" {
1919
}
2020

2121
export interface Event {
22-
playState: PlayState;
22+
readonly playState: PlayState;
2323
animate: Animate;
24-
animation: Animation;
24+
readonly animation: Animation;
2525
}
2626

2727
export interface Callback {

src/useWebAnimations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ interface Animate {
2323
}
2424
interface Callback {
2525
(event: {
26-
playState: PlayState;
26+
readonly playState: PlayState;
2727
animate: Animate;
28-
animation: Animation;
28+
readonly animation: Animation;
2929
}): void;
3030
}
3131
export interface Options<T> extends AnimConf {

0 commit comments

Comments
 (0)