We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import { add, Pair, query, spawn, Tag, target } from "@rbxts/flamecs"; const a = spawn(); const b = spawn(); interface likes extends Tag {} add<Pair<likes>>(a, b); print("start query"); for (const [e] of query<[Pair<likes>]>()) { print(`${e} likes ${target<likes>(e)}`); // NEVER PRINTS } print("end query");
The text was updated successfully, but these errors were encountered:
Not sure how useful this would be for anyone debugging but It seems for now, a syntax like this seems to be working
for (const [e] of query<[]>().pair<likes>(b)) { print(`${e} likes ${target<likes>(e)}`); // Okay, prints 269 likes 270 }
Here is the difference in code generation in Luau
for e in query({ { obj = "@rbxts/flamecs:out/registry@Wildcard", pred = "server/runtime.server@likes", } }) do print(`{e} likes {target(e, "server/runtime.server@likes")}`) end for e in query():pair(b, "server/runtime.server@likes") do print(`{e} likes {target(e, "server/runtime.server@likes")}`) end
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: