Merge pull request #2036 from szeck87/typescript-fixes
Typescript fixes
This commit is contained in:
commit
fb3f5e65ce
|
@ -1,12 +1,12 @@
|
|||
class Test extends React.Component<Foo> {
|
||||
render() {
|
||||
return (
|
||||
<div className= "class" >
|
||||
<h2 className="anotherClass" >
|
||||
{ this.foo.bar }
|
||||
< /h2>
|
||||
{ this.foo.bar.children }
|
||||
</div>
|
||||
<div className="class">
|
||||
<h2 className="anotherClass">
|
||||
{this.foo.bar}
|
||||
</h2>
|
||||
{this.foo.bar.children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
class Test extends React.Component<Foo> {
|
||||
render() {
|
||||
render() {
|
||||
return (
|
||||
<div className="class">
|
||||
<h2 className="anotherClass">
|
||||
<h2 className= "anotherClass">
|
||||
{this.foo.bar}
|
||||
</h2>
|
||||
{this.foo.bar.children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
{this.foo.bar.children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
|
@ -26,8 +26,13 @@ module.exports = class TypeScriptFormatter extends Beautifier
|
|||
opts.indentSize = options.indent_size
|
||||
opts.indentStyle = 'space'
|
||||
|
||||
if language is "TSX"
|
||||
fileName = 'test.tsx'
|
||||
else
|
||||
fileName = ''
|
||||
|
||||
@verbose('typescript', text, opts)
|
||||
result = format('', text, opts)
|
||||
result = format(fileName, text, opts)
|
||||
@verbose(result)
|
||||
resolve result
|
||||
catch e
|
||||
|
|
Loading…
Reference in New Issue