Skip to content

Commit

Permalink
chore: Minor documentation change
Browse files Browse the repository at this point in the history
  • Loading branch information
armsnyder committed Jul 1, 2024
1 parent be377fc commit 3bffc0f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ts2go.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type Struct struct {
CustomData CustomData
}

// Field is the data model for the field.tmpl template.
// Field is the data model for a field within a struct.
type Field struct {
Name string
Doc []string
Expand Down
18 changes: 10 additions & 8 deletions ts2go_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ import (

func Example() {
source := strings.NewReader(`
/**
* My type
*/
type Foo = { bar?: string /* My field */ }`)
/**
* My type
*/
type Foo = { bar?: string /* My field */ }`,
)

output := &bytes.Buffer{}

Expand All @@ -38,10 +39,11 @@ type Foo = { bar?: string /* My field */ }`)

func Example_mixins() {
source := strings.NewReader(`
/**
* My type
*/
type Foo = { bar?: string /* My field */ }`)
/**
* My type
*/
type Foo = { bar?: string /* My field */ }`,
)

output := &bytes.Buffer{}

Expand Down

0 comments on commit 3bffc0f

Please sign in to comment.