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

Requirements for roblox-ts #21

Closed
4 tasks
osyrisrblx opened this issue Jul 15, 2019 · 6 comments
Closed
4 tasks

Requirements for roblox-ts #21

osyrisrblx opened this issue Jul 15, 2019 · 6 comments

Comments

@osyrisrblx
Copy link

osyrisrblx commented Jul 15, 2019

Here's an issue for a list of things that roblox-ts needs before it can adopt rodocs for it's automated types.

  • Automated JSON releases
    Need a way to hit an endpoint and get the latest JSON blob.

  • Ability to override API signatures
    The API dump does not specify specific instance types or whether or not Instances are possibly nil. This will need to be done by hand. i.e.
    Players:GetPlayerFromCharacter(character: Instance): Instance)
    to
    Player:GetPlayerFromCharacter(character: Model): Player | nil

  • Enums Enums #7

  • DevHub Web Scraping Incorporate DevHub docs #10
    This might not be necessary if the devhub JSON endpoint comes back.

@Validark
Copy link

I believe the API dump has the same issue with typing something as Instance when it should be Instance or undefined. I submitted a PR to assume it's nullable by default. It might have been the rbx-safe-types PR, when I basically changed everything, but I'm pretty sure it was before that. So that's a problem we already "solved".

@Validark
Copy link

It would be awesome if https://github.com/rodocs/docs was more comprehensive. If needed, we could get them started by scraping our TS definitions and converting to markdown files (should just need to remove the stars on the left hand side of each line).

@osyrisrblx
Copy link
Author

I believe the API dump has the same issue with typing something as Instance when it should be Instance or undefined.

This isn't a rule we can follow 100% of the time. For example, Player.Character might be nil, but Players.LocalPlayer should never be. (Assuming client)

@osyrisrblx
Copy link
Author

It would be awesome if https://github.com/rodocs/docs was more comprehensive.

Yep, that's the idea. Once this issue is resolved, we can point @rbxts/types to the rodocs endpoint. Then any type changes could just be in the form of PRs to rodocs/docs.

I suspect we'll need to maintain a few things that don't make sense for Rodocs, but this should be pretty minimal. (i.e. lua.d.ts, roblox.d.ts, es.d.ts, etc.)

@Validark
Copy link

You seem to be saying you want us to eventually move away from needing customDefinitions.d.ts? Is that right?

@osyrisrblx
Copy link
Author

We may need some things in there, but the goal would be to remove as much of it as possible. I'd like to offload this work to the broader community via Rodocs. Optimally, Rodocs could give us everything we need in one JSON blob.

The idea is that contributions to Rodocs would benefit other projects as well.

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