mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-05 04:50:09 +08:00

* WIP
* Generation of index.js
* Add RelativeToCwd
* Add JSDoc comments
* Convert to ES6 syntax
* Fix typo
* Initial generation of typescript declarations
* Typescript improvements
* Improved @returns jsdoc
* Improved declaration files
* Simplified output
* Rename file
* Tidy up
* Revert "Simplified output"
This reverts commit 15cdf7382b
.
* Now parsing actual code
* Support Array types
* Reimagined parser
* Wrap parsing in Parser
* Rewritten module generator (TS Only)
* Final touches
* Slight refactor to improve output
* Struct comments. External struct literal binding
* Reworked project parser *working*
* remove debug info
* Refactor of parser
* remove the spew
* Better Ts support
* Better project generation logic
* Support local functions in bind()
* JS Object generation. Linting.
* Support json tags in module generation
* Updated mod files
* Support vscode file generation
* Better global.d.ts
* add ts-check to templates
* Support TS declaration files
* improved 'generate' command for module
37 lines
629 B
Go
37 lines
629 B
Go
// Package mypackage does all the things a mypackage can do
|
|
package mypackage
|
|
|
|
type Address struct {
|
|
Number int
|
|
Street string
|
|
Town string
|
|
Postcode string
|
|
}
|
|
|
|
// Person defines a Person in the application
|
|
type Person struct {
|
|
// Name is a name
|
|
Name string
|
|
Age int
|
|
Address *Address
|
|
}
|
|
|
|
// Manager is the Mr Manager
|
|
type Manager struct {
|
|
Name string
|
|
TwoIC *Person
|
|
}
|
|
|
|
// Hire me some peoples!
|
|
func (m *Manager) Hire(name, test string, bob int) *Person {
|
|
return &Person{Name: name}
|
|
}
|
|
|
|
// func NewManagerPointer() *Manager {
|
|
// return &Manager{}
|
|
// }
|
|
|
|
// func NewManager() Manager {
|
|
// return Manager{}
|
|
// }
|