(host: Host)
| 92 | } |
| 93 | |
| 94 | apply(host: Host): Promise<void> { |
| 95 | return host.read(this.path).then((content) => { |
| 96 | const prefix = content.substring(0, this.pos); |
| 97 | const suffix = content.substring(this.pos + this.toRemove.length); |
| 98 | |
| 99 | // TODO: throw error if toRemove doesn't match removed string. |
| 100 | return host.write(this.path, `${prefix}${suffix}`); |
| 101 | }); |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | /** |