Skip to content

Commit 6ca0244

Browse files
committed
Start deprecating .CreateFromMethod
1 parent a057193 commit 6ca0244

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

typescriptify/typescriptify.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,9 @@ func New() *TypeScriptify {
125125
result.kinds = kinds
126126

127127
result.Indent = " "
128-
result.CreateFromMethod = true
128+
result.CreateFromMethod = false
129129
result.CreateConstructor = true
130130

131-
if result.CreateFromMethod {
132-
fmt.Fprintln(os.Stderr, "FromMethod METHOD IS DEPRECATED AND WILL BE REMOVED!!!!!!")
133-
}
134131
return result
135132
}
136133

@@ -320,6 +317,10 @@ func (t *TypeScriptify) AddEnumValues(typeOf reflect.Type, values interface{}) *
320317
}
321318

322319
func (t *TypeScriptify) Convert(customCode map[string]string) (string, error) {
320+
if t.CreateFromMethod {
321+
fmt.Fprintln(os.Stderr, "FromMethod METHOD IS DEPRECATED AND WILL BE REMOVED!!!!!!")
322+
}
323+
323324
t.alreadyConverted = make(map[reflect.Type]bool)
324325
depth := 0
325326

0 commit comments

Comments
 (0)