MCPcopy Index your code
hub / github.com/TypeScriptToLua/TypeScriptToLua / union

Method union

src/lualib/Set.ts:170–176  ·  view source on GitHub ↗

* @returns a new Set containing all the elements in this Set and also all the elements in the argument.

(other: ReadonlySet<T>)

Source from the content-addressed store, hash-verified

168 * @returns a new Set containing all the elements in this Set and also all the elements in the argument.
169 */
170 public union(other: ReadonlySet<T>): Set<T> {
171 const result = new Set<T>(this);
172 for (const item of other) {
173 result.add(item);
174 }
175 return result;
176 }
177
178 /**
179 * @returns a new Set containing all the elements which are both in this Set and in the argument.

Callers

nothing calls this directly

Calls 1

addMethod · 0.95

Tested by

no test coverage detected