Skip to content
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

wrong createConstructionSite() definition in dist/game/index.d.ts #23

Open
lmik opened this issue May 9, 2022 · 4 comments · May be fixed by #26
Open

wrong createConstructionSite() definition in dist/game/index.d.ts #23

lmik opened this issue May 9, 2022 · 4 comments · May be fixed by #26

Comments

@lmik
Copy link
Member

lmik commented May 9, 2022

i think the fix is to just remove the definition, since the file exports the correct definitions via export * from "game/utils"

related to #15

@thmsndk
Copy link
Collaborator

thmsndk commented May 10, 2022

I think that export was removed in one of the PRs I just merged in,

are you saying this is wrong? and it should be exported from game/utils?

export function createConstructionSite(
x: number,
y: number,
structurePrototype: string /*STRUCTURE_PROTOTYPES*/
): {
object?: Structure;
error?: ERR_BUSY | ERR_INVALID_ARGS | ERR_NOT_ENOUGH_ENERGY;
};

@thmsndk
Copy link
Collaborator

thmsndk commented May 11, 2022

According to the docs it should exist in /game/utils. is it perhaps a leftover that it is exposed in game ?
Perhaps we should just remove it completely and direct people to using the one in utils?

image

@lmik
Copy link
Member Author

lmik commented May 11, 2022

I think that export was removed in one of the PRs I just merged in,

are you saying this is wrong? and it should be exported from game/utils?

export function createConstructionSite(
x: number,
y: number,
structurePrototype: string /*STRUCTURE_PROTOTYPES*/
): {
object?: Structure;
error?: ERR_BUSY | ERR_INVALID_ARGS | ERR_NOT_ENOUGH_ENERGY;
};

the definition is wrong entirely, structureType isnt a string. so if you import from game you get invalid errors

removing that definition and just exporting game/utils should fix it

@thmsndk
Copy link
Collaborator

thmsndk commented May 11, 2022

I kinda feel like just removing that definition entirely from game, not exporting it at all there, I think it's a leftover from alpha and the devs intend for it to live in utils? at least based on the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants