MCPcopy Create free account
hub / github.com/firebase/firebase-tools / unsetTargetResource

Method unsetTargetResource

src/rc.ts:192–200  ·  view source on GitHub ↗

* Removes a specific resource from a specified target. Does * not persist the result.

(project: string, type: string, name: string, resource: string)

Source from the content-addressed store, hash-verified

190 * not persist the result.
191 */
192 unsetTargetResource(project: string, type: string, name: string, resource: string): void {
193 const updatedResources = this.target(project, type, name).filter((r) => r !== resource);
194
195 if (updatedResources.length) {
196 this.set(["targets", project, type, name], updatedResources);
197 } else {
198 this.unset(["targets", project, type, name]);
199 }
200 }
201
202 /**
203 * Throws an error if the specified target is not configured for

Callers 3

applyTargetMethod · 0.95
removeTargetMethod · 0.95
rc.spec.tsFile · 0.80

Calls 3

targetMethod · 0.95
setMethod · 0.95
unsetMethod · 0.95

Tested by

no test coverage detected