Documentation Language: Swift

Method

closeFile()

Closes the current file, finalizing its content and popping its writer.

@MainActor func closeFile() async throws

Discussion

The file’s content is committed to the generation strategy, and output returns to the previous writer (either the parent file or main output).