@types/ol package and had problems.Definitions by: in index.d.ts) so they can respond.I am trying to use some functions such as easeOut (found in the easing namespace), if I try to import it as
import {easeOut} from 'ol/easing';
I get a compiler error:
ERROR in src/app/app.component.ts(9,9): error TS2305: Module '"/home/data/hacknight/stomp/node_modules/@types/ol/easing/index"' has no exported member 'easeOut'.
even if the produced js works and correctly calls the function.
If I add:
export function easeOut(t: number): number;
in @types/ol/easing/index.d.ts everything seems to work fine but I am not sure if this is the right way to fix this issue - are 5.2 @types underway?
Thanks!
Related issue: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/28500
The latest version of @types/ol is 4.6.2 and unfortunately it doesn't look like there's any progress made towards the 5.x version typings. From this comment it looks like types definition are going to be dropped by the OpenLayers team in favour of native TypeScript support (which is currently blocked because of some issues with the compiler, apparently).
The possible solutions for now would seem to be two:
@types/ol package altogether and hope for the TypeScript support to be completed soon4.6.2 release and upgrade after the TypeScript support is completePerfect, thank you very much, I was not able to discover all the related issues and the future native TypeScript support :)
any update?
I've generated complete TypeScript declaration for OpenLayers v5.3.2
Most helpful comment
Related issue: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/28500
The latest version of
@types/olis4.6.2and unfortunately it doesn't look like there's any progress made towards the5.xversion typings. From this comment it looks like types definition are going to be dropped by the OpenLayers team in favour of native TypeScript support (which is currently blocked because of some issues with the compiler, apparently).The possible solutions for now would seem to be two:
@types/olpackage altogether and hope for the TypeScript support to be completed soon4.6.2release and upgrade after the TypeScript support is complete