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

strictNullChecks still not supported in 4.1 #16357

Closed
sebek64 opened this issue Apr 26, 2017 · 7 comments
Closed

strictNullChecks still not supported in 4.1 #16357

sebek64 opened this issue Apr 26, 2017 · 7 comments
Assignees
Labels
area: core Issues related to the framework runtime

Comments

@sebek64
Copy link

sebek64 commented Apr 26, 2017

I'm submitting a ... (check one with "x")

[X ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

Compilation produces the following with strictNullChecks enabled:

node_modules/@angular/forms/src/model.d.ts(374,27): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; emitModelToViewChange?: boolea...' has no property 'onlySelf' and no string index signature.
node_modules/@angular/forms/src/model.d.ts(374,37): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; emitModelToViewChange?: boolea...' has no property 'emitEvent' and no string index signature.
node_modules/@angular/forms/src/model.d.ts(374,48): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; emitModelToViewChange?: boolea...' has no property 'emitModelToViewChange' and no string index signature.
node_modules/@angular/forms/src/model.d.ts(374,71): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; emitModelToViewChange?: boolea...' has no property 'emitViewToModelChange' and no string index signature.
node_modules/@angular/forms/src/model.d.ts(421,29): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature.
node_modules/@angular/forms/src/model.d.ts(421,39): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature.
node_modules/@angular/forms/src/model.d.ts(544,9): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature.
node_modules/@angular/forms/src/model.d.ts(544,19): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature.
node_modules/@angular/forms/src/model.d.ts(571,9): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature.
node_modules/@angular/forms/src/model.d.ts(571,19): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature.
node_modules/@angular/forms/src/model.d.ts(607,25): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature.
node_modules/@angular/forms/src/model.d.ts(607,35): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature.
node_modules/@angular/forms/src/model.d.ts(711,29): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature.
node_modules/@angular/forms/src/model.d.ts(711,39): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature.
node_modules/@angular/forms/src/model.d.ts(735,31): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature.
node_modules/@angular/forms/src/model.d.ts(735,41): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature.
node_modules/@angular/forms/src/model.d.ts(770,25): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature.
node_modules/@angular/forms/src/model.d.ts(770,35): error TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature.

Expected behavior

Compilation should not produce any errors.

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Angular version: 4.1.0
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Language: TypeScript 2.2.2

  • Node (for AoT issues): node --version = 6.10.2

@amitport
Copy link
Contributor

amitport commented Apr 27, 2017

duplicate of #15432

@vicb
Copy link
Contributor

vicb commented Apr 27, 2017

Could you attach a minimal repro. Thanks.

/cc @mhevery

@vicb vicb added the area: core Issues related to the framework runtime label Apr 27, 2017
@sebek64
Copy link
Author

sebek64 commented Apr 27, 2017

I'll try to prepare a repro case today.

@cyrilletuzi
Copy link
Contributor

cyrilletuzi commented Apr 27, 2017

I confirm this issue, repro is very simple, quite strange it hasn't been spot before release :

  • create a new project with Angular CLI
  • just add "strictNullChecks": true in tsconfig.json
  • ng serve

@mhevery
Copy link
Contributor

mhevery commented Apr 27, 2017

This is an issue with TypeScript. Looking for a workaround: microsoft/TypeScript#10078

mhevery added a commit to mhevery/angular that referenced this issue Apr 27, 2017
mhevery added a commit to mhevery/angular that referenced this issue Apr 27, 2017
mhevery added a commit to mhevery/angular that referenced this issue Apr 27, 2017
mhevery added a commit that referenced this issue Apr 28, 2017
matsko pushed a commit that referenced this issue May 4, 2017
@afnpires
Copy link

afnpires commented May 10, 2017

As an fyi, the workaround in #16389 PR did not work for me.
Using Typescript 2.3.2 and Angular 4.1.1 still throws the following

ERROR in [at-loader] ./node_modules/@angular/forms/src/model.d.ts:166:20 
    TS2459: Type '{ onlySelf?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature.

ERROR in [at-loader] ./node_modules/@angular/forms/src/model.d.ts:176:22 
    TS2459: Type '{ onlySelf?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature.

ERROR in [at-loader] ./node_modules/@angular/forms/src/model.d.ts:185:18 
    TS2459: Type '{ onlySelf?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature.

ERROR in [at-loader] ./node_modules/@angular/forms/src/model.d.ts:195:21 
    TS2459: Type '{ onlySelf?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature.

ERROR in [at-loader] ./node_modules/@angular/forms/src/model.d.ts:201:20 
    TS2459: Type '{ onlySelf?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signature.

ERROR in [at-loader] ./node_modules/@angular/forms/src/model.d.ts:210:14 
    TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signatur
e.

ERROR in [at-loader] ./node_modules/@angular/forms/src/model.d.ts:210:24 
    TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signatu
re.

ERROR in [at-loader] ./node_modules/@angular/forms/src/model.d.ts:221:13 
    TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signatur
e.

ERROR in [at-loader] ./node_modules/@angular/forms/src/model.d.ts:221:23 
    TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signatu
re.

ERROR in [at-loader] ./node_modules/@angular/forms/src/model.d.ts:244:29 
    TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'onlySelf' and no string index signatur
e.

ERROR in [at-loader] ./node_modules/@angular/forms/src/model.d.ts:244:39 
    TS2459: Type '{ onlySelf?: boolean | undefined; emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signatu
re.

ERROR in [at-loader] ./node_modules/@angular/forms/src/model.d.ts:275:49 
    TS2459: Type '{ emitEvent?: boolean | undefined; } | undefined' has no property 'emitEvent' and no string index signature.

asnowwolf pushed a commit to asnowwolf/angular that referenced this issue Aug 11, 2017
juleskremer pushed a commit to juleskremer/angular that referenced this issue Aug 28, 2017
@angular-automatic-lock-bot
Copy link

angular-automatic-lock-bot bot commented Sep 11, 2019

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 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: core Issues related to the framework runtime
Projects
None yet
Development

No branches or pull requests

6 participants