title: Type 'any[]' is not assignable to type 'typeof User' in angular 5
body: <p>I got property from the json, but it shows typo error as given below: <strong>Type 'any[]' is not assignable to type 'typeof User'</strong> 
  Below is my code app.component.ts:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import { Component, OnInit } from '@angular/core';
  import { User, UserService } from './user.service';
  @Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css'],
  providers: [UserService]
  })
  export class AppComponent implements OnInit {
  title = 'Users list';
  usersdata:User;
  constructor(private userService: UserService) { }
  ngOnInit(){
  this.userService.getUsers().then(users =&gt; this.usersdata = users.data);
  }
  }</code></pre>
  </div>
  </div>
  
  and below is my code in user.service.ts: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import { Injectable } from '@angular/core';
  export class User {
  id: number;
  name: string;
  data=[];
  }
  export class data {
  name:string;
  category:string;
  }
  @Injectable()
  export class UserService {
  constructor() { }
  getUsers(): Promise&lt;User&gt; {
  return Promise.resolve(
  { id: 1, name: 'Maria','data':[{
  name:'ramu',category:'c' 
  }]}
  );
  }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Below is my CODE URL <a href="https://stackblitz.com/edit/angular-type2?file=src%2Fapp%2Fapp.component.ts" rel="nofollow noreferrer">Code URL Stackblitz</a></p>
  
  <p>Below is my typo error screen-shot. Please tell me where i did a mistake?<a href="https://i.stack.imgur.com/c5qqn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c5qqn.png" alt="enter image description here"></a></p>