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 · 6 comments

Comments

Projects
None yet
6 participants
@sebek64

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

This comment has been minimized.

Show comment
Hide comment
@amitport

amitport Apr 27, 2017

Contributor

duplicate of #15432

Contributor

amitport commented Apr 27, 2017

duplicate of #15432

@vicb

This comment has been minimized.

Show comment
Hide comment
@vicb

vicb Apr 27, 2017

Contributor

Could you attach a minimal repro. Thanks.

/cc @mhevery

Contributor

vicb commented Apr 27, 2017

Could you attach a minimal repro. Thanks.

/cc @mhevery

@sebek64

This comment has been minimized.

Show comment
Hide comment
@sebek64

sebek64 Apr 27, 2017

I'll try to prepare a repro case today.

sebek64 commented Apr 27, 2017

I'll try to prepare a repro case today.

@cyrilletuzi

This comment has been minimized.

Show comment
Hide comment
@cyrilletuzi

cyrilletuzi Apr 27, 2017

Contributor

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
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

This comment has been minimized.

Show comment
Hide comment
@mhevery

mhevery Apr 27, 2017

Member

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

Member

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 mhevery closed this in 8c09d10 Apr 28, 2017

mhevery added a commit that referenced this issue Apr 28, 2017

matsko added a commit that referenced this issue May 4, 2017

@afnpires

This comment has been minimized.

Show comment
Hide comment
@afnpires

afnpires 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.

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 added a commit to asnowwolf/angular that referenced this issue Aug 11, 2017

juleskremer added a commit to juleskremer/angular that referenced this issue Aug 28, 2017

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