* Transform a Dagger interface identifier into an implementation of this * interface serves as module call binding to reach the true implementation.
(iface: string, id: string)
| 61 | * interface serves as module call binding to reach the true implementation. |
| 62 | */ |
| 63 | buildInterface(iface: string, id: string): any { |
| 64 | const interfaceObject = this.daggerModule.interfaces[iface] |
| 65 | if (!interfaceObject) { |
| 66 | throw new Error(`Interface ${iface} not found in the module`) |
| 67 | } |
| 68 | |
| 69 | const ifaceImpl = new InterfaceWrapper( |
| 70 | this, |
| 71 | this.daggerModule, |
| 72 | `${this.daggerModule.name}${iface}`, |
| 73 | id, |
| 74 | interfaceObject.functions, |
| 75 | ) |
| 76 | |
| 77 | return ifaceImpl |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * Transfer a Dagger enum member name into its implemented value. |