Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TsFile ¶
type TsFile struct {
// contains filtered or unexported fields
}
TsFile holds information about a Typescript - TS file, with name and source code
func New ¶
New will create a new pointer to a TsFile with the given filename
Note that the given filename cannot contain information about the folderpath
func (*TsFile) AddCode ¶
AddCode will just append the given sourceCode to the file.
Note that a "\n" will be added as a prefix to the given code
func (*TsFile) Save ¶
Save will take all the file information and save it to a real file in disk
Note that you need to pass the name of the library that generated it, in order to provide good debug information inside the generated file
The headerTitle param is used to fill the signature header, at the beginning of the file
func (*TsFile) SourceCode ¶
SourceCode will build the file source code, including the file imports source code
Note that you need to pass the name of the library that generated it, in order to provide good debug information inside the generated file
The headerTitle param is used to fill the signature header, at the beginning of the file