-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 🐛 animation options are mandatory on creating animations
When creating animation from object declarations or options, all the fields of these options were required. This commit looses the contract by applying Partial over these types.
- Loading branch information
Showing
4 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/kittik-animation-basic/src/animation/AnimationObject.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { AnimationOptions } from './AnimationOptions'; | ||
|
||
export interface AnimationObject<T, O extends AnimationOptions> { | ||
export interface AnimationObject<T, O extends Partial<AnimationOptions>> { | ||
type: T | ||
options: O | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { AnimationOptions, AnimationType } from './Animations'; | ||
import { AnimationObject } from 'kittik-animation-basic'; | ||
|
||
export interface AnimationDeclaration extends AnimationObject<AnimationType, AnimationOptions<AnimationType>> { | ||
export interface AnimationDeclaration extends AnimationObject<AnimationType, Partial<AnimationOptions<AnimationType>>> { | ||
name: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { ShapeOptions, ShapeType } from './Shapes'; | ||
import { ShapeObject } from 'kittik-shape-basic'; | ||
|
||
export interface ShapeDeclaration extends ShapeObject<ShapeType, ShapeOptions<ShapeType>> { | ||
export interface ShapeDeclaration extends ShapeObject<ShapeType, Partial<ShapeOptions<ShapeType>>> { | ||
name: string | ||
} |