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) -> beautify: (text, language, options) ->
return new @Promise((resolve, reject) -> return new @Promise((resolve, reject) ->
TF = require("typescript-formatter/typescript-toolbox/lib/formatter") format = require("typescript-formatter/lib/formatter")
opts = TF.createDefaultFormatCodeOptions()
opts = {}
opts.TabSize = options.tab_width opts.TabSize = options.tab_width
opts.IndentSize = options.indent_size opts.IndentSize = options.indent_size
result = TF.applyFormatterToContent(text, opts) result = format(text, opts)
resolve result resolve result
) )