ajvincent/ts-morph-structures

In type structure classes, consider replacing writerFunction with stringOrWriter

Closed this issue · 1 comments

For LiteralTypeStructureImpl, NumberTypeStructureImpl, and StringTypeStructureImpl, it doesn't make sense to have writer functions. The last can do JSON.stringify(this.stringValue), and the others just return this.stringValue;.

I didn't think this all the way through: typedWriter.stringOrWriter(writer) looks terrible.