Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 错误:无法调用其类型缺少调用签名的表达式。类型';没有兼容的c ll签名_Javascript_Angular_Typescript - Fatal编程技术网

Javascript 错误:无法调用其类型缺少调用签名的表达式。类型';没有兼容的c ll签名

Javascript 错误:无法调用其类型缺少调用签名的表达式。类型';没有兼容的c ll签名,javascript,angular,typescript,Javascript,Angular,Typescript,我尝试在angular项目中使用,当我尝试运行ng server时,构建失败,出现以下错误 error TS2349: Cannot invoke an expres ion whose type lacks a call signature. Type node_modules/@types/polylabel/index"'has no compatible c ll signatures. 以下是index.ts的代码 // Type definitions for polyla

我尝试在angular项目中使用,当我尝试运行ng server时,构建失败,出现以下错误

error TS2349: Cannot invoke an expres ion whose type lacks a call signature. Type node_modules/@types/polylabel/index"'has no compatible c ll signatures.
以下是index.ts的代码

    // Type definitions for polylabel 1.0
   // Project: https://github.com/mapbox/polylabel

    // Definitions by: Denis Carriere <https://github.com/DenisCarriere>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

    /**
     * Polylabel returns the pole of inaccessibility coordinate in [x, y] format.
     *
     * @param polygon - Given polygon coordinates in GeoJSON-like format
     * @param precision - Precision (1.0 by default)
     * @param debug - Debugging for Console
     * @example
     * var p = polylabel(polygon, 1.0);
     */
    declare function polylabel(polygon: number[][][], precision?: number, debug?: boolean): number[];
    declare namespace polylabel {}
    export default polylabel;
//多段标签1.0的类型定义
//项目:https://github.com/mapbox/polylabel
//定义:Denis Carriere
//定义:https://github.com/DefinitelyTyped/DefinitelyTyped
/**
*Polylabel以[x,y]格式返回不可访问坐标的极点。
*
*@param polygon-类似GeoJSON格式的给定多边形坐标
*@param precision-精度(默认为1.0)
*@param debug-控制台调试
*@example
*var p=多段标签(多边形,1.0);
*/
声明函数polylabel(多边形:编号[],精度?:编号,调试?:布尔):编号[];
声明命名空间多段标签{}
导出默认多段标签;

显然,我没有在全球安装polylabel。执行
npm安装polylabel
修复了该问题。

显然,我没有全局安装polylabel。执行
npm安装polylabel
修复了该问题