title: Getting "Type 'Promise<IResourceWeightage>' is not assignable to type 'IResourceWeightage'." error when calling method via service method call?
body: <p>I have this method in one of the service I am using to get <code>ResourceWeightage</code> details:</p>
  
  <pre><code>getResourceLevelProgress(learning_node_id: number): Promise&lt;IResourceWeightage&gt; {
  return this.getOverallProgressData()
    .then(learning_nodes =&gt; learning_nodes.find(node =&gt; node.learning_node_id === learning_node_id).resource_weightage);
  </code></pre>
  
  <p>}</p>
  
  <p>following is the method in component where I am accessing this method to get <code>ResourceWeightage</code> details:</p>
  
  <p>Declaration:</p>
  
  <pre><code>resourceWeightage: IResourceWeightage;
  </code></pre>
  
  <p>Call:</p>
  
  <pre><code>this.resourceWeightage = this.progressUpdateService.getResourceLevelProgress(this.learningNodeId);
  </code></pre>
  
  <p>I am getting this error while accessing this variable:</p>
  
  <blockquote>
    <p>Type 'Promise' is not assignable to type IResourceWeightage.</p>
  </blockquote>