From 48ef9d2354dc21afa3ec1509563c219cfd641e5d Mon Sep 17 00:00:00 2001 From: sZLukas1607 Date: Fri, 29 May 2020 08:47:14 +0200 Subject: [PATCH] --- waitForReplicants.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 waitForReplicants.md diff --git a/waitForReplicants.md b/waitForReplicants.md new file mode 100644 index 0000000..d80eb5f --- /dev/null +++ b/waitForReplicants.md @@ -0,0 +1,19 @@ +(static) waitForReplicants(replicants) → {Promise.} +Lets you easily wait for a group of Replicants to finish declaring. +Returns a promise which is resolved once all provided Replicants have emitted a change event, which is indicates that they must have finished declaring. +This method is only useful in client-side code. Server-side code never has to wait for Replicants. +#Parameters +Name Type Description +replicants Replicant +#Example +From a graphic or dashboard panel: +Copy +const rep1 = nodecg.Replicant('rep1'); +const rep2 = nodecg.Replicant('rep2'); + +// You can provide as many Replicant arguments as you want, +// this example just uses two Replicants. +NodeCG.waitForReplicants(rep1, rep2).then(() => { + console.log('rep1 and rep2 are fully declared and ready to use!'); +}); +Willkommen im Wiki. \ No newline at end of file