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

[Feature] Resolvable support #75

Merged
merged 5 commits into from
Jan 18, 2022
Merged

Conversation

not-so-smart
Copy link
Member

This PR prepares the codebase for resolvable types to be implemented in node-groupme. See #51 for more info on resolvables.

This PR adds the following properties/methods to BaseManager:

  • BaseManager<T>#resolve(data: any): T | null
  • BaseManager<T>#resolveId(data: any): string | null
  • BaseManager<T>#holds: new (client: Client, ...args: any) => T

The resolve and resolveId methods take a data resolvable and return the resolved data structure. These can be overridden in managers to allow for more powerful and applicable object resolution.

The holds property is the constructor of the type being held by this Manager instance.

@not-so-smart not-so-smart merged commit e8e9077 into groupme-js:main Jan 18, 2022
@not-so-smart not-so-smart deleted the resolvables branch January 18, 2022 23:19
@thewilloftheshadow thewilloftheshadow added the refactor Refactor of code label Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactor of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants