Skip to content

Commit bef9b25

Browse files
superchuNoviny
authored andcommitted
Typescript support (#26)
* Fix comment rendering + type aliasing * Fixed type alias * Fix type declaration * Fix external file import * WIP: TS-support * Support TSMethodSignature * Refactor TSInterfaceBody * Add support for TSParenthesizedType * Add minor support for old any types * Add TSThisKind * Fix TSThisKind type * Resolve export all declaration * Refactor object properties for TS * Add support for TS interface extend * Cleanup. Add flow types, remove redundant code * Upgrade deps to support JSX fragments + TS * Recursively resolve export all * Give fixtures more meaningful names * Support recursive types and correct recursive file resolution
1 parent 0886e75 commit bef9b25

File tree

12 files changed

+1828
-343
lines changed

12 files changed

+1828
-343
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ language: node_js
33
node_js:
44
- '8'
55
cache: yarn
6-
script: yarn test
6+
script: |
7+
yarn flow check
8+
if [[ $? != 0 ]]; then exit 1; fi
9+
yarn test

__fixtures__/nested-exports/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './nested-export';
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export interface NestedInterface1 {
2+
nestedProperty1: boolean;
3+
nestedProperty2: string;
4+
}

__fixtures__/props.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export interface Props {
2+
id: number;
3+
name: string;
4+
}
5+
6+
export * from './types';

__fixtures__/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export interface Type {
2+
c: boolean
3+
}
4+
5+
export * from './nested-exports';

0 commit comments

Comments
 (0)