Pri*_*ati 6 partial-classes typescript
files.ts
export class ServiceUrls {
static baseUrl: string = 'http://localhost:52949/V1/';
static baseImageUrl: string = 'http://localhost:52949/';
}
Run Code Online (Sandbox Code Playgroud)
filess1.ts
extends interface ServiceUrls{
static baseUrl: string = 'http://localhost:52949/V1/';
static baseImageUrl: string = 'http://localhost:52949/';
}
Run Code Online (Sandbox Code Playgroud)
如何在打字稿中实现部分类。我应该如何提供相同类的引用以使其像部分类一样工作。如果我在files1.ts中提供相同的类名称,则它会给出错误声明或预期的语句。