Code Monkey home page Code Monkey logo

Comments (3)

mmomtchev avatar mmomtchev commented on May 9, 2024

openlayers/openlayers#12497

from rlayers.

santiagotsp avatar santiagotsp commented on May 9, 2024

This is my tsconfig.json before running the app and Geolocation.tsx doesn´t show any errors.
{ "compilerOptions": { "target": "es5", "lib": [ "dom", "dom.iterable", "esnext" ], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": false, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx", "baseUrl": "./", "paths": { "ol": [ "node_modules/@types/ol" ], "ol/*": [ "node_modules/@types/ol/*" ] }, }, "include": [ "src" ] }

After running the app the tsconfig.json changed to (deletes paths attribute):
{ "compilerOptions": { "target": "es5", "lib": [ "dom", "dom.iterable", "esnext" ], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": false, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx", "baseUrl": "./" }, "include": [ "src" ] }

The Geolocatio.tsx file show this errors:
error_rlayers

from rlayers.

mmomtchev avatar mmomtchev commented on May 9, 2024

Yes, the new OpenLayers 6.6.0 native Typescript types are not compatible, you have to keep the paths for now
An eventual new rlayers 1.1 version will support the new Typescript types, but it won't be compatible with OpenLayers < 6.6.0
I am still waiting for the typings to stabilize - there was a new 6.6.1 release a few hours ago - and I will publish rlayers 1.1
For now the only way to use OpenLayers 6.6.0 with Typescript is to add the paths attribute

from rlayers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.