Skip to content

consider turning on noImplicitAny by default #107

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

Closed
3 tasks
IgorMinar opened this issue Dec 15, 2015 · 7 comments · Fixed by #213
Closed
3 tasks

consider turning on noImplicitAny by default #107

IgorMinar opened this issue Dec 15, 2015 · 7 comments · Fixed by #213
Assignees

Comments

@IgorMinar
Copy link
Contributor

currently our blueprints don't pass the noImplicitAny check - we should fix that.

  • understand the impact
  • change the config
  • update blueprints that fail the check

Current failures for an empty project:

[DiffingTSCompiler]: Typescript found the following errors:
  app/sample-45.spec.ts (7, 71): Parameter 'app' implicitly has an 'any' type.
  app/sample-45.spec.ts (12, 65): Parameter 'app' implicitly has an 'any' type.
  app/sample-45.ts (14, 17): Parameter 'meaning' implicitly has an 'any' type.

@rkirov @alexeagle - what's your guidance on this?

@alexeagle
Copy link
Contributor

Why is it necessary to "pass the noImplicitAny check" - what is requiring that?

My (our?) guidance is: for someone brand-new to TypeScript, optional typing is a feature and helps them ramp up. Similarly, when migrating an existing codebase (eg what we did for Angular), noImplicitAny is a critical step to make this tractable and incremental.
However, anyone with some experience who is starting a new app that's not just a toy example or rapid prototype is better off with noImplicitAny turned on from the beginning.

@Brocco
Copy link
Contributor

Brocco commented Dec 15, 2015

I agree that turning on noImplicitAny in the tsconfig file would not be a good idea as it could be cumbersome for someone starting with TypeScript.

That being said, I think that the initial output of the blueprints should be accommodating if the user wants to turn that setting on, they should not have to modify any of the code which is generated via our blueprints.

@IgorMinar
Copy link
Contributor Author

sgtm - let's update the blueprints but keep the flag off by default.

On Tue, Dec 15, 2015 at 7:34 AM Mike Brocchi [email protected]
wrote:

I agree that turning on noImplicitAny in the tsconfig file would not be a
good idea as it could be cumbersome for someone starting with TypeScript.

That being said, I think that the initial output of the blueprints should
be accommodating if the user wants to turn that setting on, they should not
have to modify any of the code which is generated via our blueprints.


Reply to this email directly or view it on GitHub
#107 (comment)
.

@alexeagle
Copy link
Contributor

Make sure you have some testing with noImplicitAny=true so the invariant
you desire is enforced by the continuous build! :)

On Tue, Dec 15, 2015 at 8:05 AM Igor Minar [email protected] wrote:

sgtm - let's update the blueprints but keep the flag off by default.

On Tue, Dec 15, 2015 at 7:34 AM Mike Brocchi [email protected]
wrote:

I agree that turning on noImplicitAny in the tsconfig file would not be a
good idea as it could be cumbersome for someone starting with TypeScript.

That being said, I think that the initial output of the blueprints should
be accommodating if the user wants to turn that setting on, they should
not
have to modify any of the code which is generated via our blueprints.


Reply to this email directly or view it on GitHub
<
https://github.com/angular/angular-cli/issues/107#issuecomment-164799941>
.


Reply to this email directly or view it on GitHub
#107 (comment)
.

@Brocco Brocco self-assigned this Feb 17, 2016
Brocco added a commit to Brocco/angular-cli that referenced this issue Feb 17, 2016
Resolved noImplicitAny issues in blueprints
Updated expect for ng build verifications
Fixes angular#107
@Brocco
Copy link
Contributor

Brocco commented Feb 17, 2016

The PR I submitted (#213) covers all aspects specified here by @IgorMinar.

  • The noImplicitAny flag is turned off in the blueprints so as to not force developers to have that flag on by default.
  • All templates have been updated so they compile without issue if the flag is turned on
  • A test was added to verify compilation if the noImplicitAny flag is turned on, which will capture any errors introduced with blueprint upgrades

@IgorMinar
Copy link
Contributor Author

Nice! Thanks
On Wed, Feb 17, 2016 at 5:03 AM Mike Brocchi [email protected]
wrote:

The PR I submitted (#213 #213)
covers all aspects specified here by @IgorMinar
https://github.com/IgorMinar.

  • The noImplicitAny flag is turned off in the blueprints so as to not
    force developers to have that flag on by default.
  • All templates have been updated so they compile without issue if the
    flag is turned on
  • A test was added to verify compilation if the noImplicitAny flag is
    turned on, which will capture any errors introduced with blueprint upgrades


Reply to this email directly or view it on GitHub
#107 (comment)
.

clydin pushed a commit that referenced this issue Jun 5, 2018
use base64 of
```xml
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 250 250">
  <path fill="#DD0031" d="M125 30L31.9 63.2l14.2 123.1L125 230l78.9-43.7 14.2-123.1z"/>
  <path fill="#C3002F" d="M125 30v22.2-.1V230l78.9-43.7 14.2-123.1L125 30z"/>
  <path fill="#FFF" d="M125 52.1L66.8 182.6h21.7l11.7-29.2h49.4l11.7 29.2H183L125 52.1zm17 83.3h-34l17-40.9 17 40.9z"/>
</svg>
```
instead of Adobe Illustrator export svg result
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants