typeorm/typescript-example

tsc fails

rightisleft opened this issue · 2 comments

Just checked out the repo and follows the instructions in README. NPM start fails - i noticed there's no build folder. Running tsc manually results in:

➜  typescript-example git:(master) ✗ tsc
node_modules/rxjs/observable/PairsObservable.d.ts(1,1): error TS2688: Cannot find type definition file for 'chai'.
node_modules/rxjs/observable/dom/AjaxObservable.d.ts(1,1): error TS2688: Cannot find type definition file for 'chai'.
src/entity/Post.ts(17,9): error TS2345: Argument of type '{ cascadeInert: boolean; }' is not assignable to parameter of type 'string | ((object: {}) => any)'.
  Object literal may only specify known properties, and 'cascadeInert' does not exist in type 'string | ((object: {}) => any)'.

I had the same problem.
I got a running sample after:

  • npm install --save typeorm@0.0.2-alpha.70
  • Post.ts: fixing typo "cascadeInert: true" -> "cascadeInsert: true"
  • index.ts: changing "autoSchemaCreate: true" -> "autoSchemaSync true"

Regards,
Walter

thanks @WalterLeinert I have updated it to latest typeorm version + fixed typo