Repository navigation
Replies: 9 comments
|
No, importing the packet classes is the only way to do use them right now. What other way would you suggest? |
|
oh ok, thanks. |
|
i added this in the common js index.js .... not so sure about esm yet /** Packet Classes */ |
|
Do I understand correctly that your goal is to be able to import the packets directly from Like this: const { IS_BTC, IS_MST } = require('node-insim');The decision to import them from Do you think it would be better to import everything from |
yes |
|
Speaking as someone who isn't super involved in typescript and/or javascript, I'd be curious to know what the benefit is @DevCobe? This seems a bit like tidying up deck chairs on the Titanic. |
When i wanted to package it as a standalone app it gives errors as no package name exist with . /packets or can't find the module name with . /packets |
|
There may be something wrong with the configuration of your packager of choice. If you want, you can share some details of your workflow and maybe we can fix it together. In any case, splitting the node-insim imports into two paths like this was probaly unnecessary. I don't think there would be a naming conflict if everything was imported from the root namespace. |
|
you can check my youtube page with what i build with it..https://www.youtube.com/@gracechildracing. |
Uh oh!
There was an error while loading. Please reload this page.
is ther another way to load packets instead of this way
const {
InSimFlags,IS_BTC, IS_MST,IS_SCC,IS_CPR, IS_TINY, IS_SMALL, TinyType,PacketType, RaceState
} = require('node-insim/packets');
All reactions