JaeSeoKim / kakao.maps.d.ts

TypeScript Definitions for kakao.maps.* (Kakao(구 Daum) 지도 Web API)
https://apis.map.kakao.com/web/documentation
MIT License
68 stars 12 forks source link

빌드시 오류 #8

Closed KNamuuu closed 1 year ago

KNamuuu commented 1 year ago

안녕하세요 react프로젝트에 kakao map api를 사용하려고, 적용을 했는데 실행은 됩니다만 빌드가 되지를 않네요..

말씀해주신대로 yarn add kakao.maps.d.ts --dev 한뒤 tsconfig.json도 수정을 했는데 빌드를 하게되면

node_modules/kakao.maps.d.ts/@types/Circel.d.ts:75:13 - error TS2430: Interface 'setCircleOptions' incorrectly extends interface 'CircleOptions'.
  Types of property 'center' are incompatible.
    Type 'LatLng | undefined' is not assignable to type 'LatLng'.
      Type 'undefined' is not assignable to type 'LatLng'.

75   interface setCircleOptions extends CircleOptions {
               ~~~~~~~~~~~~~~~~

node_modules/kakao.maps.d.ts/@types/CustomOverlay.d.ts:101:21 - error TS2371: A parameter initializer is only allowed in a function or constructor implementation.

101     public setRange(range: number = 500): void;
                        ~~~~~~~~~~~~~~~~~~~

node_modules/kakao.maps.d.ts/@types/drawing.DrawingManager.d.ts:23:12 - error TS7010: 'setStyle', which lacks return-type annotation, implicitly has an 'any' return type.

23     public setStyle(type: T, prop: string, value: string | number);
              ~~~~~~~~

node_modules/kakao.maps.d.ts/@types/drawing.DrawingManager.d.ts:30:12 - error TS7010: 'setStrokeWeight', which lacks return-type annotation, implicitly has an 'any' return type.

30     public setStrokeWeight(strokeWeight: number);
              ~~~~~~~~~~~~~~~

node_modules/kakao.maps.d.ts/@types/drawing.DrawingManager.d.ts:37:12 - error TS7010: 'setStrokeColor', which lacks return-type annotation, implicitly has an 'any' return type.

37     public setStrokeColor(strokeColor: string);
              ~~~~~~~~~~~~~~

node_modules/kakao.maps.d.ts/@types/drawing.DrawingManager.d.ts:46:12 - error TS7010: 'select', which lacks return-type annotation, implicitly has an 'any' return type.

46     public select(type: T, index?: number);
              ~~~~~~

node_modules/kakao.maps.d.ts/@types/drawing.DrawingManager.d.ts:51:12 - error TS7010: 'cancel', which lacks return-type annotation, implicitly has an 'any' return type.

51     public cancel();
              ~~~~~~

node_modules/kakao.maps.d.ts/@types/drawing.DrawingManager.d.ts:58:12 - error TS7010: 'undo', which lacks return-type annotation, implicitly has an 'any' return type.

58     public undo();
              ~~~~

node_modules/kakao.maps.d.ts/@types/drawing.DrawingManager.d.ts:64:12 - error TS7010: 'redo', which lacks return-type annotation, implicitly has an 'any' return type.

64     public redo();
              ~~~~

이런식으로 오류가 발생하네요 kakao.map.d.ts에서 제가 뭘 잘못한걸까요 ??

tsconfig.json 파일입니다

{
  "compilerOptions": {
    "target": "ESNext",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "types": [
      "vite/client",
      "kakao.maps.d.ts"
    ],
    "allowJs": false,
    "skipLibCheck": false,
    "esModuleInterop": false,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noFallthroughCasesInSwitch": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx"
  },
  "include": [
    "src"
  ]
}
JaeSeoKim commented 1 year ago

tsconfig.json 파일에서 skipLibCheck: true로 설정 부탁드립니다.

JaeSeoKim commented 1 year ago

다음 버전에 해당 문제점들은 수정하여서 반영하도록 하겠습니다.!

KNamuuu commented 1 year ago

감사합니다 ... !!!