MCPcopy Create free account
hub / github.com/aws/constructs / of

Function of

src/dependency.ts:86–92  ·  view source on GitHub ↗

* Return the matching Dependable for the given class instance.

(instance: IDependable)

Source from the content-addressed store, hash-verified

84 * Return the matching Dependable for the given class instance.
85 */
86 public static of(instance: IDependable): Dependable {
87 const ret = (instance as any)[DEPENDABLE_SYMBOL];
88 if (!ret) {
89 throw new Error(`${instance} does not implement IDependable. Use "Dependable.implement()" to implement`);
90 }
91 return ret;
92 }
93
94 /**
95 * Return the matching Dependable for the given class instance.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected