Skip to content

Commit

Permalink
fix: fixed ts-node ignore files (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
whxaxes authored and atian25 committed Aug 1, 2018
1 parent 641c0c4 commit a790304
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/ts-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

require('ts-node').register({
typeCheck: true,
files: true,
});
4 changes: 3 additions & 1 deletion test/fixtures/example-ts/app/controller/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Controller } from 'egg';

export default class HomeController extends Controller {
public async index() {
this.ctx.body = 'hi, egg';
const obj: PlainObject = {};
obj.text = 'hi, egg';
this.ctx.body = obj.text;
}
}
3 changes: 3 additions & 0 deletions test/fixtures/example-ts/typings/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
interface PlainObject extends Object {
[key: string]: any;
}

0 comments on commit a790304

Please sign in to comment.