2016-10-02 2 views
12

가장 최근의 [email protected] 빌드 프로세스와 함께 typescript 2.0을 사용하고 있습니다. `@ types` typescript 2.0에서 유형 정의를 가져 오는 방법

는이 같은 구글 -지도 유형도 설치 :

npm install @types/google-maps --save-dev --save-exact

을하고 나는이

/// <reference types="google-maps" /> 
import { LatLng, LatLngBounds } from 'google-maps'; 

처럼 내 코드로 유형 정의의 일부를 가져 오기 위해 노력하고있어하지만 난 얻을 이 타이피 스크립트 오류 :

./node_modules/@types/google-maps/index.d.ts has no exported member 'LatLng'

나는 소스에 보면, 사실

./node_modules/@types/google-maps/node_modules/@types/googlemaps/index.d.ts

답변

0

import은 현재 패키지 작동하지 종속성의 정의를 찾을 수 있습니다.

그래서 당신은 import { LatLng, LatLngBounds } from 'googlemaps'

+0

대. 비평하거나 저자의 설명을 요청하려면 게시물 아래에 의견을 남겨 둡니다. - [From Review] (리뷰/저품절 게시물/18095085) –

관련 문제