(
first: string | number = 0.6,
duration?: number,
)
| 131 | public append(code: string, duration: number): ThreadGenerator; |
| 132 | public append(duration?: number): TagGenerator; |
| 133 | public append( |
| 134 | first: string | number = 0.6, |
| 135 | duration?: number, |
| 136 | ): TOwner | ThreadGenerator | TagGenerator { |
| 137 | if (typeof first === 'string') { |
| 138 | if (duration === undefined) { |
| 139 | const current = this.get(); |
| 140 | return this.set({ |
| 141 | progress: 0, |
| 142 | fragments: [...current.fragments, first], |
| 143 | }); |
| 144 | } else { |
| 145 | return this.appendTween(first, duration); |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | const savedDuration = first; |
| 150 | return (strings, ...tags) => |
| 151 | this.append(resolveCodeTag(CODE(strings, ...tags), true), savedDuration); |
| 152 | } |
| 153 | |
| 154 | public prepend(code: string): TOwner; |
| 155 | public prepend(code: string, duration: number): ThreadGenerator; |
no test coverage detected