angularjstypescript

Module has no exported member, export interface


This is the error I'm getting,

/Users/robot/code/slg-fe/src/app/leaderboards/leaderboards.component.ts (2,10): Module '"/Users/robot/code/slg-fe/src/app/leaderboards/leaderboard"' has no exported member 'Leaderboard'.

My leaderboard.ts file:

export interface Leaderboard {
  id: number,
  username: string,
  rank_elo: number,
  role: number,
  total_wins: number,
  kda: number,
  yesterday_rank: number
}

My leaderboard.component.ts file:

import { Component } from '@angular/core';
import { Leaderboard } from './leaderboard';

@Component({
  selector: 'leaderboards',
  templateUrl: './leaderboards.component.html'
})
export class LeaderboardsComponent { }

My leaderboard.ts file IS exporting a Leaderboard, but for some reason it's not?


Solution

  • So.. I'm not sure why, but when I restarted my server it all started working.. I spent so long trying to figure this out.