Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript compiler output bunch of errors for version 0.6.0-beta.3 #190

Closed
bosunolanrewaju opened this issue Nov 7, 2017 · 11 comments
Closed
Labels

Comments

@bosunolanrewaju
Copy link

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?

@RobinBuschmann
Copy link
Member

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

@schmod
Copy link
Contributor

schmod commented Nov 7, 2017

@bosunolanrewaju What version of typescript are you using?

@schmod
Copy link
Contributor

schmod commented Nov 7, 2017

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

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

@Tower450
Copy link

Tower450 commented Nov 7, 2017

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

@schmod
Copy link
Contributor

schmod commented Nov 7, 2017

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

@Tower450
Copy link

Tower450 commented Nov 7, 2017

alright thanks bro! :)

@RobinBuschmann
Copy link
Member

@schmod According to this issue: microsoft/TypeScript#204 typeof T is not valid unfortunately

@Tower450
Copy link

Tower450 commented Nov 7, 2017

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

node_modules\@types

@bosunolanrewaju
Copy link
Author

@schmod Typescript version is 2.6.1

@schmod
Copy link
Contributor

schmod commented Nov 7, 2017

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

@RobinBuschmann
Copy link
Member

v0.6.0-beta.4 is released now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants