From 644bbf99145042266ea8cf2890cef5771bd04be4 Mon Sep 17 00:00:00 2001 From: MALO <57839069+MDLC01@users.noreply.github.com> Date: Tue, 30 May 2023 10:13:27 +0200 Subject: Add `fields` method to content (#1340) --- docs/src/reference/types.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/src/reference/types.md b/docs/src/reference/types.md index 13ca8720..715427f3 100644 --- a/docs/src/reference/types.md +++ b/docs/src/reference/types.md @@ -604,6 +604,13 @@ field does not exist or fails with an error if no default value was specified. A default value to return if the field does not exist. - returns: any +### fields() +Return the fields of this content. + +```example +#repr(rect(width: 10cm, height: 10cm).fields()) +``` + ### location() The location of the content. This is only available on content returned by [query]($func/query), for other content it will fail with an error. The -- cgit v1.2.3