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

extendXxCollection() doesn't warn about extraneous properties #42

Open
minenwerfer opened this issue Sep 30, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@minenwerfer
Copy link
Contributor

The fix is simple:

export declare const extendUserCollection: <
  const TCollection extends {
    [P in Exclude<keyof Collection, "functions">]?: Partial<Collection[P]>;
  } & {
    functions?: {
      [F: string]: (
        payload: any,
        context: Context<(typeof user)["description"]>
      ) => unknown;
    };
  }
>(
- collection: TCollection
+ collection: Pick<TCollection, keyof Collection>
) => ExtendCollection<typeof user, TCollection>;
@minenwerfer minenwerfer added the bug Something isn't working label Sep 30, 2024
@minenwerfer minenwerfer added this to the First beta release milestone Sep 30, 2024
@minenwerfer minenwerfer reopened this Nov 14, 2024
@minenwerfer
Copy link
Contributor Author

Reopening this issue as the proposed fix crashed some existing applications.
We should revert back to the old form for now while a better solution doesn't appear.

@minenwerfer minenwerfer removed this from the First beta release milestone Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant