(name: string, signal?: AbortSignal)
| 207 | } |
| 208 | |
| 209 | async getSprite(name: string, signal?: AbortSignal): Promise<SpriteResource> { |
| 210 | const response = await fetch(this.spritePath(name), { |
| 211 | method: 'GET', |
| 212 | headers: this.headers(), |
| 213 | ...(signal ? { signal } : {}), |
| 214 | }) |
| 215 | if (!response.ok) await this.fail('GET', this.spritePath(name), response) |
| 216 | return parseSprite(await response.text()) |
| 217 | } |
| 218 | |
| 219 | async deleteSprite(name: string, signal?: AbortSignal): Promise<void> { |
| 220 | const response = await fetch(this.spritePath(name), { |
no test coverage detected