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
in the old version 0.6.7, we have this kind of code
for (const field of object.fields) { const fieldValue = field.value as number; console.log(fieldValue) }
that eventually can give you values of all fields.
But starting from 0.7.0, the fields was removed, and have to explicitly specify the field name first.
fields
field name
But my use case is to get all the fields regardless of the Object is class or struct.
For a class I could get by doing this:
for (const f of object.class.fields) { const field = object.field(f.name); }
But if the object is a struct, object.class would be undefined
object.class
undefined
I'm using version 0.9.0.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
in the old version 0.6.7, we have this kind of code
that eventually can give you values of all fields.
But starting from 0.7.0, the
fields
was removed, and have to explicitly specify thefield name
first.But my use case is to get all the fields regardless of the Object is class or struct.
For a class I could get by doing this:
But if the object is a struct,
object.class
would beundefined
I'm using version 0.9.0.
The text was updated successfully, but these errors were encountered: