diff --git a/zh-cn/application-dev/quick-start/arkts-animatable-extend.md b/zh-cn/application-dev/quick-start/arkts-animatable-extend.md index 37976872e3ee57c5a5c66586a1194dca814f3f95..b161981521d4bceee24402d47de5a837372d6966 100644 --- a/zh-cn/application-dev/quick-start/arkts-animatable-extend.md +++ b/zh-cn/application-dev/quick-start/arkts-animatable-extend.md @@ -101,7 +101,7 @@ class PointVector extends Array implements AnimatableArithmetic)[i].plus((rhs as Array)[i])) } return result } @@ -109,14 +109,14 @@ class PointVector extends Array implements AnimatableArithmetic)[i].subtract((rhs as Array)[i])) } return result } multiply(scale: number): PointVector { let result = new PointVector([]) for (let i = 0; i < this.length; i++) { - result.push(this[i].multiply(scale)) + result.push((this as Array)[i].multiply(scale)) } return result } @@ -125,14 +125,14 @@ class PointVector extends Array implements AnimatableArithmetic)[i].equals((rhs as Array)[i])) { return false } } return true } - get():Array<[x: number, y: number]> { - let result = [] + get(): Array { + let result: Array = [] this.forEach(p => result.push([p.x, p.y])) return result }