-
Notifications
You must be signed in to change notification settings - Fork 4
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
update EntityFactory types + compiling errors #42
Conversation
Also updated some types that were failing on build |
keywords: string[]; | ||
quests?: EntityReference[]; | ||
uuid?: string; | ||
} | ||
|
||
export class Npc extends Scriptable(Character) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scriptable is already in Character and this was causing some circular dependency issues I believe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're right about this -- I forget if I fixed this the same way locally but I definitely ran into it. Good call
"@types/winston": "^2.4.4", | ||
"@types/ws": "^7.4.5", | ||
"bcryptjs": "^2.4.0", | ||
"commander": "^4.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had a compile error from commander in the node_modules. We only use the 'types' in core-ts, so just upgraded to the real package (as the types are just a stub) until the error went away.
@@ -376,11 +378,14 @@ export class BundleManager { | |||
* @param {EntityFactory} factory | |||
* @return {Array<string>} | |||
*/ | |||
async loadEntities( | |||
async loadEntities< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good use of generics here
Did some EntityFactory types on my repo, so transferred the work I did to here.
There is some wonky assumptions made between the property of id/entityReference/area between the Area + Item/Npc/Room that some of them use some of those properties, and some others.
I think this gets us 1 step closer to true types and less type bypassing.