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

Some of the Typescript not respecting noImplicitAny from project tsconfig.json file #140

Closed
brianjorden opened this issue Apr 21, 2017 · 4 comments

Comments

@brianjorden
Copy link

It seems there is a slightly inconsistent behavior of Typescript parsing and the usage of the project's local tsconfig.json settings. The part I've really noticed is the noImplicitAny flag being interpreted in some, but not all places. The screenshot below shows a couple arbitrary function definitions inside and outside a component's export default. Based on reading some of the comments in the Typescript pull request, it seems there are some assumptions that have to be made about the default export, and it might be tied to that. I've also included a couple declarations that show appropriate errors when the type IS given, so it is obviously trying to validate things. The difference is between thing2 and stuff2.

image

@octref
Copy link
Member

octref commented Apr 25, 2017

Would you mind sharing the test project with me?

@octref
Copy link
Member

octref commented Apr 27, 2017

Also see #159 (comment)

@octref
Copy link
Member

octref commented May 2, 2017

I'll track this in #159.

@evenfrost
Copy link

Just faced this one recently. TypeScript checking with noImplicitAny is not working in .vue files for this specific case, but others do.

Tested on vue-cli with TypeScript config.

Here, VS Code outputs only 1 typechecking error (though event in onClick method has implicit any type):

screen1

However, TypeScript compiler correctly outputs 2 errors:

screen2

@octref as this issue and #159 are now closed, #170 is not quite related to TypeScript itself but to TSLint support and #188 seems to not have TypeScript-specific tasks in it, I just wanted to make sure this issue is still being tracked.

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

No branches or pull requests

3 participants