Question: I'm importing Svg.js into my typescript project. When I call SVG I receive the following error. 
`Uncaught (in promise) TypeError: SVG is not a function`

I've tried to import Svg.js in different ways, but that doesn't seem to be the issue. I also tried to call on 'SVG' in different ways as well.
Using Svg.js version `@svgdotjs/svg.js": "^3.0.11`

Ex:

```
import * as SVG from "@svgdotjs/svg.js";
const svgjs: any = SVG;
export default svgjs;

```

```
    let draw = new SVG.Doc('drawing');
    let rect = draw.rect(100, 100).attr({fill: "#f06"})

```

The above method returns `Uncaught (in promise) TypeError: SVG.Doc is not a constructor`

Here is how I import Svg.js.
`import * as SVG from '@svgdotjs/svg.js'`

This is how I use 'SVG'.

```
let draw = SVG('drawing');
let rect = draw.rect(100, 100).attr({fill: "#f06"})

```

Answer: 
```
import SVG from "@svgdotjs/svg.js/src/svg" //v3.0

let draw = SVG().addTo('#drawing').viewbox(0, 0, 300, 140)
let rect = draw.rect(100, 100).attr({fill: "#f06"})

```
It may depend on your Babel configuration, but in my experience, `import * as X` creates an object that wraps up all the exports of a module. So you'd have to call:

```
let draw = SVG.default('drawing');

```

Or better, convert the import to `import X`:

```
import SVG from "@svgdotjs/svg.js";
...
let draw = SVG('drawing');

```