简体   繁体   English

'MapEditServiceConfig'仅引用类型,但在此处用作值

[英]'MapEditServiceConfig' only refers to a type, but is being used as a value here

Not sure why this error is prompting for MapEditServiceConfig , saying MapEditServiceConfig refers to a type , also what do we understand as MapEditServiceConfig {}, as MapEditServiceConfig is a interface, what this bracket says? 不知道为什么这个错误提示MapEditServiceConfig,说MapEditServiceConfig引用了一个类型,我们也理解为MapEditServiceConfig {},因为MapEditServiceConfig是一个接口,这个括号怎么说?

export interface MapEditServiceConfig extends AppCredentialsConfig {
    readonly "moderation.authServiceId": string;
    readonly "maphub.mc.endpoint": string;
}

export interface AppConfig
    extends MapDataServiceConfig,
        GeocoderConfig,
        LoginServiceConfig,
        ScbeServiceConfig,
        MapJobServiceConfig,
        TaskProviderServiceConfig,
        YourXYZSpaceServiceConfig {

                       "map.defaultLocation":MapDataModels.MapLocation;
            "app.imageBasePath": string;
        },
        MapEditServiceConfig {}  // Getting the refers to a //type , but use as a value here

In your list of interfaces the AppConfig extends there is this part: AppConfig扩展的接口列表中有以下部分:

 {
   "map.defaultLocation":MapDataModels.MapLocation;
   "app.imageBasePath": string;
},

that is interpreted by the compiler as the actual definition of the AppConfig interface. 由编译器解释为AppConfig接口的实际定义。

The comma is a syntax error, the compiler expects a declaration. 逗号是语法错误,编译器需要声明。

After that follows a new statement MapEditServiceConfig which is interpreted by the compiler as an literal value. 之后是一个新语句MapEditServiceConfig ,它由编译器解释为文字值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 导出时类型“仅指一种类型,但在此处用作值” - Type “only refers to a type, but is being used as a value here” when exporting “承诺”仅指类型,但在此处用作值 - 'Promise' only refers to a type, but is being used as a value here “'输出'仅指一种类型,但在此处使用了一个值”错误 - "'Output' only refers to a type, but is being used a value here" error “post”仅指一种类型,但在此处用作值 - 'post' only refers to a type, but is being used as a value here 元素指的是一个值,但在这里被用作类型 - element refers to a value, but is being used as a type here 'ItemIsLoading'on指的是一种类型,但此处被用作值 - 'ItemIsLoading' on refers to a type, but is being used as a value here 指的是一个值,但在这里被用作一个类型 - refers to a value, but is being used as a type here IFormContext 只引用一个类型,但在这里用作一个值 - IFormContext only refers to a type, but is used as a value here NPM模块“仅指类型,但在此处用作值。”在Ionic 2 / Angular 2中 - NPM module “only refers to a type, but is being used as a value here.” in Ionic 2 / Angular 2 打字稿:错误 TS2693:“Promise”仅指一种类型,但在此处用作值 - typescript: error TS2693: 'Promise' only refers to a type, but is being used as a value here
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM