fix typescript support

This commit is contained in:
ewgeniux 2015-05-20 11:06:21 +03:00
parent 9148d3eea5
commit 25e2a754d5
1 changed files with 3 additions and 3 deletions

View File

@ -10,13 +10,13 @@ module.exports = class TypeScriptFormatter extends Beautifier
beautify: (text, language, options) ->
return new @Promise((resolve, reject) ->
TF = require("typescript-formatter/typescript-toolbox/lib/formatter")
opts = TF.createDefaultFormatCodeOptions()
format = require("typescript-formatter/lib/formatter")
opts = {}
opts.TabSize = options.tab_width
opts.IndentSize = options.indent_size
result = TF.applyFormatterToContent(text, opts)
result = format(text, opts)
resolve result
)