Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

code definintion support #5

Open
phyzical opened this issue Jan 6, 2022 · 4 comments
Open

code definintion support #5

phyzical opened this issue Jan 6, 2022 · 4 comments

Comments

@phyzical
Copy link

phyzical commented Jan 6, 2022

Hey thanks for the addon, and i understand you have only just started work on this integration, but is there maybe a rough feature plan for it?

was just wondering if code definition support is on the table?
i have never tired to import d.ts files so i'm not sure if this is possible but could you leverage the typescript definitions and ship as part of the addon?

@The-Hierophant
Copy link

import d.ts file works for now.
Look at danielyxie/bitburner#1942 (comment)
and use NetscriptDefinitions.d.ts as index.d.ts.

@Root-Core
Copy link

It would be nice if the type definition was provided via npm.
It would be even better to provide the types with the plugin.
Maybe as a manual plugin command for now or with an autoupdate function?

I do not want to use npm in my Bitburner scripts, to keep it clean and tidy.

@phyzical
Copy link
Author

@The-Hierophant thanks for that can confirm this works

@Root-Core the biggest issue is it needs to be resolvable in a way that will also work for the game itself

@Root-Core
Copy link

@phyzical This shouldn't be a problem, as they are just types. If the IDE (vscode) can figure out the types you are all set.
They are not validated at runtime and are not transmitted to the game. There should not be any effect on the game.

The plugin could just spit out the file on demand and give you a reminder to update it, if there is a new version.

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

No branches or pull requests

3 participants