CodeSquared docs

File

A File is an object used during code generation to represent an output file.

It is produced during the generate phase and serves as an input to the render phase where it is converted into a string.

Constructor

new File(path)
Constructor parameters
PropertyTypeDescription
pathstringAbsolute file path with output root folder represented as @

Return value

A new File object

Properties

PropertyTypeDescription
pathstringAbsolute file path with output root folder represented as @
importsMap<string, Set<string>>Imported external modules. Map keys is a module name and value is a Set of import name strings
definitionsMap<string, Definition>Definitions in file. Map key is variable or type name and value is a Definition