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

Support for community-maintained type definitions for non-trust scripts #224

Open
danswann opened this issue Dec 29, 2024 · 1 comment
Open

Comments

@danswann
Copy link
Contributor

danswann commented Dec 29, 2024

It would be cool if people could upload type definition files for their own public-facing scripts, or upload definitions for other popular in-game scripts similar to DefinitelyTyped, and have them be merged into the global $fs / $hs / etc. object.

I don't know TypeScript configuration/tooling well enough to know if this would actually require any work in here and/or in HSE.

Probably only worth it if there is meaningful interest, otherwise it's just a complicated way of writing them for my own consumption.

@samualtnorman
Copy link
Owner

my current thinking is that if people want to do this they can upload their own NPM packages which users can install and add to their tsconfig's compilerOptions.types array. currently script makers who want to do this will have to manually write these type declarations which is not ideal as this means these types will exist twice, once in their source and once in their manually written type declarations. it would be preferred if these declarations could be auto generated from script's source code but this would require inspecting types which HSM currently does not do

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

No branches or pull requests

2 participants