Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TsImports ¶
type TsImports []*tsImport
TsImports is a collection of single Typescript - TS line imports
func (*TsImports) AddDefaultImport ¶
AddDefaultImport will add a new default import for the given path
If the given path already has a default import, and it is not equal the given defaultImport param, an error will be returned, since a path can not contain more than one default import
If there's another default/named import with the name equal to the given defaultImport param, in the entire list of imports, an error will be returned, since an import name must be unique
If there's no error (return value == nil), the given defaultImport will never be changed inside the imports
func (*TsImports) AddNamedImport ¶
AddNamedImport will add a new named import to the given path
If there's another default/named import with the name equal to the given namedImport, in the entire list of imports, an error will be returned, since an import name must be unique
If there's no error (return value == nil), the given namedImport will never be changed inside the imports
func (TsImports) SourceCode ¶
SourceCode will return valid Typescript - TS code, for the stored imports, ready to be compiled