question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Included typings do not work correctly

See original GitHub issue

I’ve been using types from DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ol) and all worked fine.

It wants to use new OL included typings in 6.3.0 and ignores the DefinitelyTyped typings. The included types does not work correctly.

Example of included types: image

Comparsion between OL types and DefinitelyTyped types image

How can I use the OL types in this example where DefinitelyTyped typings are used:

this.draw = new Draw({
	source: this.source,
	type: GeometryType.POINT,
	snapTolerance: 6,
	stopClick: true
});

There are many types like this.

How can I exclude/ignore the included types and use types from https://github.com/DefinitelyTyped? I have angular application with tsconfig.json. I’ve tried ignore section in tsconfig.json but it does not help. image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:22 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
Siedlerchrcommented, Apr 6, 2020

I can confirm that the new patched version works now (using TS 3.8) . It fortunately still works with the types from https://github.com/hanreev/types-ol

This is now my workaround for having types in an Angular project

3reactions
MichalK6677commented, Apr 4, 2020

@ahocevar I still do not know how to use it. Compilation errors: image

Is this a valid syntax? image

I am using typescript “typescript”: “3.8.3” and latest build “ol”: “6.3.1-dev.1586002061224”.

“skipLibCheck”: true has no effect.

There is a workaround to be able to update openlayers and build application => remove included typings with postintall in package.json

"postinstall": "del .\\node_modules\\ol\\*.ts /s /q",
Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Asp.net Typings not working
I'm using visual studio Angular2 mvc5 template and I changed model of it. And I generated model's typescript version with TypeLite. Now I...
Read more >
keyboard not working correctly type in J and get uyj ...
I have checked the settings and the language is set correctly. I have done the alt + shift keys. I have tried the...
Read more >
Quick Fixes to “Can't Type in Windows Search” (Pictures ...
If it still does not work, go on performing the following steps. Step 1: Right-click the taskbar and then choose Task Manager.
Read more >
TSConfig Reference - Docs on every TSConfig option
It is not a mechanism that prevents a file from being included in the codebase ... of TypeScript's configuration and it covers how...
Read more >
How To Include Typing Skills on a Resume (With Template ...
Typing is a useful skill that is applicable to many different jobs. Having excellent typing skills allows you to communicate more ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found