(props: string[], final?: boolean)
| 31 | getProps<P extends (keyof T)[]>(props: P, final?: boolean): Pick<T, P[number]>; |
| 32 | getProps<P extends string>(props: P[], final?: boolean): Partial<Record<P, unknown>>; |
| 33 | getProps(props: string[], final?: boolean): Partial<Record<string, unknown>> { |
| 34 | const anims = this.$animations; |
| 35 | if (!final || !anims) { |
| 36 | class="cm">// let's not create an object, if not needed |
| 37 | return this as Record<string, unknown>; |
| 38 | } |
| 39 | const ret: Record<string, unknown> = {}; |
| 40 | props.forEach((prop) => { |
| 41 | ret[prop] = anims[prop] && anims[prop].active() ? anims[prop]._to : this[prop as string]; |
| 42 | }); |
| 43 | return ret; |
| 44 | } |
| 45 | } |
no test coverage detected