【发布时间】:2018-06-08 13:45:09
【问题描述】:
我在尝试编译我的 ionic ts 代码时遇到问题。
在transpile 部分的代码编译时失败了,因为
[02:17:56] 打字稿:...project/node_modules/@types/geojson/index.d.ts,行:142 ',' 预期。
L141: id?: string | number;
L143: * Properties associated with this feature.
[02:17:56] 打字稿:...project/node_modules/@types/geojson/index.d.ts,行:163 ',' 预期。
[02:17:56] 打字稿:...project/node_modules/@types/geojson/index.d.ts,行:164 泛型类型“功能”需要 3 个类型参数。
[02:17:56] 打字稿:...project/node_modules/@types/leaflet/index.d.ts,行:605 泛型类型“功能”需要 3 个类型参数。
nds InternalPolyline {
L606: constructor(latlngs: LatLngExpression[], options?: PolylineOptions);
[02:17:56] 打字稿:...project/node_modules/@types/leaflet/index.d.ts,行:607 泛型类型“功能”需要 3 个类型参数。
L606: constructor(latlngs: LatLngExpression[], options?: PolylineOptions);
L607: toGeoJSON(): GeoJSONFeature<GeoJSONPolygon | GeoJSONMultiPolygon>;
[02:17:56] 打字稿:...project/node_modules/@types/leaflet/index.d.ts,行:614 泛型类型“功能”需要 3 个类型参数。
ends Polygon {
L615: constructor(latLngBounds: LatLngBoundsExpression, options?: PolylineOptions);
[02:17:56] 打字稿:...project/node_modules/@types/leaflet/index.d.ts,行:616 泛型类型“功能”需要 3 个类型参数。
L615: constructor(latLngBounds: LatLngBoundsExpression, options?: PolylineOptions);
16: setBounds(latLngBounds: LatLngBoundsExpression): this;
[02:17:56] 打字稿:...project/node_modules/@types/leaflet/index.d.ts,行:634 泛型类型“功能”需要 3 个类型参数。
L633: options: CircleMarkerOptions;
L634: feature?: GeoJSONFeature<GeoJSONPoint>;
[02:17:56] 打字稿:...project/node_modules/@types/leaflet/index.d.ts,行:641 泛型类型“功能”需要 3 个类型参数。
L640: constructor(latlng: LatLngExpression, options?: CircleMarkerOptions);
L641: constructor(latlng: LatLngExpression, radius: number, options?: CircleMarkerOptions); // deprecated!
L642: getBounds(): LatLngBounds;
[02:17:56] 打字稿:...project/node_modules/@types/leaflet/index.d.ts,行:689 泛型类型“FeatureCollection”需要 3 个类型参数。
L690: * Removes the layer with the given internal ID or the given layer from the group.
[02:17:56] 打字稿:...project/node_modules/@types/leaflet/index.d.ts,行:689 泛型类型“功能”需要 3 个类型参数。
L690: * Removes the layer with the given internal ID or the given layer from the group.
[02:17:56] 打字稿:...project/node_modules/@types/leaflet/index.d.ts,行:743 泛型类型“FeatureCollection”需要 3 个类型参数。
L742: function layerGroup(layers: Layer[]): LayerGroup;
[02:17:56] 打字稿:...project/node_modules/@types/leaflet/index.d.ts,行:743 泛型类型“功能”需要 3 个类型参数。
L742: function layerGroup(layers: Layer[]): LayerGroup;
[02:17:56] 打字稿:...project/node_modules/@types/leaflet/index.d.ts,行:783 泛型类型“功能”需要 3 个类型参数。
L782: * feature and its LatLng.
L784: * The default is to spawn a default Marker:
[02:17:56] 打字稿:...project/node_modules/@types/leaflet/index.d.ts,行:799 泛型类型“功能”需要 3 个类型参数。
L798: * The default value is to not override any defaults:
L800: * ```
[02:17:56] 打字稿:...project/node_modules/@types/leaflet/index.d.ts,行:825 泛型类型“功能”需要 3 个类型参数。
L826: * function (geoJsonFeature) {
[02:17:56] 打字稿:...project/node_modules/@types/leaflet/index.d.ts,行:838 泛型类型“功能”需要 3 个类型参数。
L837: coordsToLatLng?(coords: [number, number] | [number, number, number]): LatLng; // check if LatLng has an altitude property
[02:17:56] 打字稿:...project/node_modules/@types/leaflet/index.d.ts,行:856 泛型类型“功能”需要 3 个类型参数。
L855: static coordsToLatLng(coords: [number, number] | [number, number, number]): LatLng;
[02:17:56] 打字稿:...project/node_modules/@types/leaflet/index.d.ts,行:890 泛型类型“功能”需要 3 个类型参数。
L889: addData(data: GeoJSONGeoJsonObject): Layer;
[02:17:56] 打字稿:...project/node_modules/@types/leaflet/index.d.ts,行:890 泛型类型“功能”需要 3 个类型参数。
L889: addData(data: GeoJSONGeoJsonObject): Layer;
错误:编译程序失败 在 BuildError.Error (本机) 在新的 BuildError (project\node_modules\@ionic\app-scripts\dist\util\errors.js:16:28) 在 project\node_modules\@ionic\app-scripts\dist\transpile.js:137:20 在 transpileWorker (project\node_modules\@ionic\app-scripts\dist\transpile.js:103:12) 在 Object.transpile (project\node_modules\@ionic\app-scripts\dist\transpile.js:61:12) 在 buildProject (project\node_modules\@ionic\app-scripts\dist\build.js:97:78) 在 project\node_modules\@ionic\app-scripts\dist\build.js:47:16
有人知道怎么解决吗?
【问题讨论】:
标签: typescript ionic-framework types ionic2 leaflet