Skip to content

Recognize pack parameters in model types #16

Description

@coord-e

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions