Skip to content

Commit

Permalink
fix(typings): correct ERROR TS2411 when compiling with strict mo…
Browse files Browse the repository at this point in the history
…de on

Closes #49.
  • Loading branch information
tinesoft committed May 14, 2019
1 parent b771bd2 commit 4fb02eb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions demo/src/app/home/playground/playground.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ export class PlaygroundComponent implements OnInit {
.get(['cookie.header', 'cookie.message', 'cookie.dismiss', 'cookie.allow', 'cookie.deny', 'cookie.link', 'cookie.policy'])
.subscribe(data => {

if(!this.options.content)
this.options.content = {};

this.options.content.header = data['cookie.header'];
this.options.content.message = data['cookie.message'];
this.options.content.dismiss = data['cookie.dismiss'];
Expand Down
2 changes: 1 addition & 1 deletion src/model/content-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ export class NgcContentOptions {

target ? = '_blank';

[key: string]: string;
[key: string]: string | undefined;
}
2 changes: 1 addition & 1 deletion src/model/html-elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ export class NgcHTMLElements {

close ? = '<span aria-label="dismiss cookie message" tabindex="0" class="cc-close">{{close}}</span>';

[key: string]: string;
[key: string]: string | undefined;
}

0 comments on commit 4fb02eb

Please sign in to comment.