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

Recognize pack parameters in model types #16

Open
coord-e opened this issue Dec 26, 2020 · 0 comments
Open

Recognize pack parameters in model types #16

coord-e opened this issue Dec 26, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@coord-e
Copy link
Owner

coord-e commented Dec 26, 2020

Some of the current model types are based on the "packed" representation in misskey.
There are pack functions that take parameters, and the form of the packed representation returned depends on the parameter.

https://github.com/syuilo/misskey/blob/ec4d5857d80938758ce64930159be2c941d4e30f/src/models/repositories/user.ts#L147-L154

Currently, we do not take these parameters into account, and we deal with it by using Option to fields that depends on the parameter. Since this approach misses quite a lot of invariants, it is expected to introduce a model type that statically considers the pack parameter.

@coord-e coord-e added the enhancement New feature or request label Dec 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant