Type 'void' is not assignable to type 'any[]'
<p>I am getting error at following line of the constructor code</p>

<pre><code>this.data = this.getRisks(); . 
</code></pre>

<p>The error is </p>

<blockquote>
  <p>Type 'void' is not assignable to type 'any[]'.</p>
</blockquote>

<p>Could somebody tell me how do i assign it .</p>

<pre><code>import { Component, OnInit } from '@angular/core';
import { Risk } from './risk';
import { RiskService } from './risk.service';
import { GridModule, GridDataResult, PageChangeEvent } from '@progress/kendo-angular-grid';

@Component({
    moduleId: module.id,
    selector: 'rm-risks',
    templateUrl: '/app/risk-list.component.html',
    providers: [RiskService]
})

export class RiskListComponent implements OnInit {
    private gridView: GridDataResult;
    private data: any[];
    private pageSize: number = 50;
    private skip: number = 0;
    title = 'Risk List';
    risks: Risk[];

    constructor(private _riskService: RiskService) {
        this.data = this.getRisks();
        this.loadRisks();
     }

    protected pageChange(event: PageChangeEvent): void {
        this.skip = event.skip;
        this.loadRisks();
    }

    private loadRisks(): void {
        this.gridView = {
            data: this.data.slice(this.skip, this.skip + this.pageSize),
            total: this.data.length
        };
    }

    getRisks(): void {
        this._riskService.getRisks().then(risks =&gt; this.risks = risks);

    }

    ngOnInit(): void {
        this.getRisks();
    }
};
</code></pre>

<p><strong>risk.service.ts</strong></p>

<pre><code>import { Injectable } from '@angular/core';
import { Risk } from './risk';
import { Risks } from './mock-risk';
import { Http, Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/from';


@Injectable()
export class RiskService {

    getRisks(): Promise&lt;Risk[]&gt; {
        return Promise.resolve(Risks);
    }

}
</code></pre>