2016-05-18 13 views
1

私はクラスとインターフェイスを含む以下のコードを持っています。何らかの理由でVisual Studioが "RouteInterfaceという名前を見つけることができません"という叫び声をしています。理由はわかりません。Typescript名前 'XInterface'を見つけることができません

import {Student} from './student'; 

export interface RouteInterface{ 
    id: number; 
    startTime: Date; 
    endTime: Date; 
    neighborhood: string; 
    students: Student[]; 
    tooltip: string; 
    tooltipcls: string; 
    icon: string; 
} 


export class Route extends RouteInterface { 
    id: number; 
    startTime: Date; 
    endTime: Date; 
    neighborhood: string; 
    students: Student[]; 
    tooltip: string; 
    tooltipcls: string; 
    icon: string; 

} 

答えて

2

私はあなたの代わりにextends 1のimplementsキーワードを使用する必要があることだと思う:

export class Route implements RouteInterface { 
    (...) 
} 
+0

私は愚かな感じ#$#@ @ .. – gilmishal

+1

あなたが;-)それが簡単だべきではありません!他人のコードでこれを見てください... –

関連する問題