Ondra Žižka Ondra Žižka - 8 months ago 69
TypeScript Question

TypeScript: How to import ES6 Map (NetBeans can't find)

We switched to from System.js to WebPack, and now NetBeans doesn't know where to find certain types, like

. The compiler is ok. It's just about code completion. I assume it's because the TypeScript plugin only knows how to deal with

I have tried this:

$ find -name Map*

So I tried these:

//import {Map} from 'rxjs/util/Map'
import {Map} from 'rxjs/src/util/Map'

But they are just (respectively)

export declare const Map: any
export const Map = root.Map || (() => MapPolyfill)();

and NetBeans complain on any normal use of the type.

I was also looking at
(after adding it to systemjs.config.js):

import {Map} from 'core-js/modules/es6.map';

But NetBeans says 'can't find module ...'.

What should I import to declare
to an unaware tool?


The error was, as some suspected, in the NetBeans plugin. NetBeans plugins repository contains an old version.

Downloading the latest version helped.