-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TypeScript] can't reference D2RMM's own types in mods because the definitions are outside of the /mods/ folder #30
Comments
So, the way |
Well I guess that seems to work, but it still leaves me with my IDE showing a lot of errors because it can't find those types. Is there a way to fix that? |
Oh, I think I understand your question - you want to reference the types in |
Exactly, that's what I meant. For this line right here: protected findJsonFileEntryByKey(jsonFile: JSONData, key: string): Record<string, string> { // PROBLEM HERE So I can define param |
BTW, until the exporting is done, you can always derive these types. e.g.:
|
TypeScript support has been a blessing for my modding. One issue that I've run into a few times though is that D2RMM doesn't support its own types.
To reproduce, add this file to a mod and try to install it.
(Don't mind the technical side of what the code is supposed to do, it's still a work in progress)
D2RMM will give this error message:
The text was updated successfully, but these errors were encountered: