Lucas Azzola
7e60d70f97
fix(typescript): always break interfaces onto multiple lines, fixes #2159 ( #2161 )
2017-06-15 14:34:54 -10:00
Christopher Chedeau
0d239477cb
Use semi-colon for object separator ( #1918 )
...
Looks like the convention for typescript separator is `;` whereas for flow it's `,`. Let's migrate to that.
Fixes #1896
Fixes #1879
Fixes #1874
2017-06-02 15:32:51 -07:00
Christopher Chedeau
e58dd2bf0b
Add semi for ts function declarations without body ( #1911 )
...
Fixes #1891
2017-06-02 14:49:37 -07:00
Christopher Chedeau
faf2ac5f9e
Hack to get export default work ( #1866 )
...
Fixes #1854
2017-06-02 08:12:03 -07:00
Lucas Azzola
59a760c5d8
TypeScript: fix namespace comment printing ( #1765 )
...
* fix(typescript): fix namespace comment printing
* fix(typescript): remove extra newline after comment
* chore(lint): lint changes
2017-05-26 21:30:42 -07:00
Lucas Azzola
934216d852
fix(typescript): allow parens with TSFunctionType and ignore empty specifiers ( #1764 )
2017-05-26 20:47:48 -07:00
Christopher Chedeau
fc88aa185b
Add parenthesis around binary expression inside of update expression ( #1672 )
...
This is not valid code but TypeScript parses it. It's easy to fix so might as well so we have one less failing test.
2017-05-23 12:33:03 -07:00
Lucas Azzola
599444fe7f
fix(typescript): add TSInterfaceHeritage to ast-types ( #1644 )
2017-05-21 08:10:04 -07:00
Lucas Azzola
575980d7f4
fix(typescript): handle global namespace without modifiers ( #1646 )
2017-05-21 08:09:29 -07:00
Lucas Azzola
5c6fd80d50
fix(typescript): handle undefined variable declarations ( #1645 )
2017-05-21 08:03:38 -07:00
Danny Martini
fc60d548aa
Fix/ts interface heritage ( #1601 )
...
* fix TSCallSignature
* fix TSTypeReference
* remove test with invalid syntax
* --wip--
* partially fix TSTypeReference
* get comments right for TypeScript interfaces
2017-05-20 03:15:50 -07:00
Lucas Azzola
fa27e5838c
feat(typescript): add TSTypeAssertionExpression and naive TSX detection ( #1545 )
2017-05-07 08:09:52 -07:00
Lucas Azzola
3471ce4584
feat(typescript): print semi instead of comma in TS interface ( #1548 )
2017-05-07 07:39:21 -07:00
Lucas Azzola
5cc7878902
fix(typescript): fix a handful of ast(prettier(input)) issues ( #1544 )
2017-05-06 22:34:47 -07:00
Lucas Azzola
92d5a57122
fix(typescript): add TSNamespaceFunctionDeclaration to ast-types ( #1543 )
2017-05-06 21:33:07 -07:00
Lucas Azzola
5fd9cd01de
test(typescript): do not fail debug check on Literal -> Identifier ( #1540 )
2017-05-06 19:39:19 -07:00
Lucas Azzola
4629db6b0d
TypeScript: improve handling of computed properties ( #1532 )
...
* fix(typescript): improve handling of computed properties
* test(typescript): add Symbol computed property test
* fix(typescript): do not print brackets for literals
2017-05-06 08:00:26 -07:00
Lucas Azzola
11e3d8241f
TypeScript: print modifiers on TSIndexSignature and TSPropertySignature ( #1531 )
...
* fix(typescript): print modifiers on TSIndexSignature
* fix(typescript): print modifiers on TSPropertySignature and reformat TSMappedType
2017-05-06 06:18:23 -07:00
Lucas Azzola
8a8a67b9fe
fix(typescript): print typeArguments in TSExpressionWithTypeArguments ( #1530 )
2017-05-06 06:17:48 -07:00
Igor Oleinikov
f51822c16d
fix(TypeScript): define TSFunctionType AST node ( #1529 )
...
- fixes printing of comments inside function type node
2017-05-05 22:14:12 -07:00
Lucas Azzola
b23c16d05d
fix(typescript): print typeParameters on TSMethodSignature ( #1523 )
2017-05-05 21:11:13 -07:00
Christopher Chedeau
1a1e6fc1dd
Print empty member lookup ( #1506 )
...
I have no idea if it's even valid but it threw on 8 typescript tests, now it doesn't.
```js
TypeError: Cannot read property 'type' of null
at printMemberLookup (prettier/src/printer.js:3062:16)
```
2017-05-04 11:20:52 -07:00