Sequelize-typescript: Typescript compiler output bunch of errors for version 0.6.0-beta.3

Created on 7 Nov 2017  路  11Comments  路  Source: RobinBuschmann/sequelize-typescript

Anybody familiar with this error when compiling a project running sequelize-typescript v 0.6.0-beta.3:

node_modules/sequelize-typescript/lib/models/Model.d.ts(133,129): error TS2693: 'T' only refers to a type, but is being used as a value here.

133   static scope<T extends Model<T>>(this: (new () => T), options?: string | string[] | ScopeOptions | WhereOptions<any>): typeof T;

Plus many others similar to this one.

Is there any settings or configuration setup that I am missing?

bug

Most helpful comment

Looks like you need skipLibCheck": true in your .tsconfig.

All 11 comments

@bosunolanrewaju Looks like a bug. typeof T is invalid imo. @schmod or am I wrong?

@bosunolanrewaju What version of typescript are you using?

@Tower540 @bosunolanrewaju can you try again with TS 2.5.3?

That's what we use internally, and it seems to work.

sorry i don't have this error, i was on the bad thread lol

Looks like you need skipLibCheck": true in your .tsconfig.

alright thanks bro! :)

@schmod According to this issue: https://github.com/Microsoft/TypeScript/issues/204 typeof T is not valid unfortunately

@schmod not working still has the same error if the folder is not in

node_modules\@types

@schmod Typescript version is 2.6.1

@RobinBuschmann Ugh, you're right. I don't think we can have typesafety on scopes 馃槩

v0.6.0-beta.4 is released now

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oscarcalvo picture oscarcalvo  路  3Comments

thestrayed picture thestrayed  路  5Comments

libvirtadept picture libvirtadept  路  4Comments

YaroslavOsetrov picture YaroslavOsetrov  路  3Comments

CampaUTN picture CampaUTN  路  4Comments