Chris Frewin
1 min readJun 23, 2020

--

Hi Cameron, great article!

Do you know how this would work if we had a class with static methods? I'd like to import MyClassName from 'my-npm-package' and then do something like MyClassName.doSomething(), but the import wasn't working after running npm install (in the seperate project where i wanted to use my package) I'm guessing it has something to do with how I need to export / name things in my typescript project.

In the end I used your pattern of exporting function and importing them that way, i.e., import { myfunction } from 'mypackage'

--

--

Chris Frewin
Chris Frewin

Written by Chris Frewin

https://wheelscreener.com https://vannacharm.com https://chrisfrew.in 👨‍💻 Software Engineer 🏠 Austria/USA 🍺 Homebrewer ⛷🏃‍ 🚴 Outdoorsman

No responses yet