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

Added Partial to the creatEvent the body args type #14

Merged
merged 2 commits into from
May 17, 2023

Conversation

KyloJorgensen
Copy link
Contributor

@KyloJorgensen KyloJorgensen commented Dec 31, 2019

Fix for
image

The package does a merge but the types match in documented use cases.

This PR does a Deep Partial to make it simple to use.

@silentworks
Copy link

It would be nice to get this change merged in.

@billkidwell
Copy link

Agreed. Can we get this merged?

@cozmo
Copy link

cozmo commented Jul 24, 2020

What has to be done to get this merged? Makes the library fairly unusable in a typescript project currently :(

@cozmo
Copy link

cozmo commented Jul 24, 2020

FYI we've forked and published a version of this library with these changes - you can view/install it here https://github.com/Metronome-Industries/event-mocks.

Ideally I'd love for these changes to be merged/published here, but until then feel free to make PRs etc against our fork, we'll try to be responsive, merge changes, etc as needed.

@AlexHayton
Copy link

This would be super helpful!

@krishnagopinath
Copy link

@cozmo Thanks for making this new version! Could I make a PR to your repo that fixes #26 ?

@cozmo
Copy link

cozmo commented Apr 22, 2021

Yeah sure!

@krishnagopinath
Copy link

@cozmo just did, thank you!

@KyloJorgensen
Copy link
Contributor Author

@astuyve @chrismcleod @dschep Can someone please review or at least comment on this?

It has been over 3 years

@astuyve
Copy link
Contributor

astuyve commented Apr 27, 2023

Hey @KyloJorgensen - unfortunately the three of us left Serverless.com some years ago, and no longer have permissions to maintain this library.

@KyloJorgensen
Copy link
Contributor Author

Hey @KyloJorgensen - unfortunately the three of us left Serverless.com some years ago, and no longer have permissions to maintain this library.

@astuyve Thanks for reply.

@Danwakeem Hey Dan could you or someone on your team please review this PR or give me some feedback?

Thanks so much

@medikoo medikoo merged commit b2f5677 into serverless:master May 17, 2023
@medikoo
Copy link
Contributor

medikoo commented May 17, 2023

If anyone would be interested in maintaining this package, please let me know

@KyloJorgensen
Copy link
Contributor Author

@medikoo are you planning a release on npm for all the changes on master?

@medikoo
Copy link
Contributor

medikoo commented May 18, 2023

@KyloJorgensen I wanted to do so, but apparently the build script fails now:

% npm run build

> @serverless/event-mocks@1.1.1 build /Users/medikoo/npm-packages/@serverless/event-mocks
> tsc -p ./

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1025:21 - error TS1110: Type expected.

1025         : K extends `${number}`
                         ~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1026:24 - error TS1005: ':' expected.

1026             ? 'length' extends keyof T
                            ~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1026:38 - error TS1005: ';' expected.

1026             ? 'length' extends keyof T
                                          ~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1027:26 - error TS1005: ':' expected.

1027                 ? number extends T['length']
                              ~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1028:30 - error TS1005: ':' expected.

1028                     ? number extends keyof T
                                  ~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1028:44 - error TS1005: ';' expected.

1028                     ? number extends keyof T
                                                ~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1031:21 - error TS1128: Declaration or statement expected.

1031                     : undefined
                         ~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1043:41 - error TS1110: Type expected.

1043     type GetFieldType<T, P> = P extends `${infer Left}.${infer Right}`
                                             ~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1043:50 - error TS1005: '}' expected.

1043     type GetFieldType<T, P> = P extends `${infer Left}.${infer Right}`
                                                      ~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1043:55 - error TS1128: Declaration or statement expected.

1043     type GetFieldType<T, P> = P extends `${infer Left}.${infer Right}`
                                                           ~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1043:57 - error TS1005: ';' expected.

1043     type GetFieldType<T, P> = P extends `${infer Left}.${infer Right}`
                                                             ~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1043:64 - error TS1005: ';' expected.

1043     type GetFieldType<T, P> = P extends `${infer Left}.${infer Right}`
                                                                    ~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1046:29 - error TS1005: ';' expected.

1046             : Left extends `${infer FieldKey}[${infer IndexKey}]`
                                 ~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1046:30 - error TS1005: ';' expected.

1046             : Left extends `${infer FieldKey}[${infer IndexKey}]`
                                  ~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1046:37 - error TS1005: ';' expected.

1046             : Left extends `${infer FieldKey}[${infer IndexKey}]`
                                         ~~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1046:48 - error TS1005: ',' expected.

1046             : Left extends `${infer FieldKey}[${infer IndexKey}]`
                                                    ~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1046:55 - error TS1005: ',' expected.

1046             : Left extends `${infer FieldKey}[${infer IndexKey}]`
                                                           ~~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1053:26 - error TS1005: ';' expected.

1053             : P extends `${infer FieldKey}[${infer IndexKey}]`
                              ~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1053:27 - error TS1005: ';' expected.

1053             : P extends `${infer FieldKey}[${infer IndexKey}]`
                               ~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1053:34 - error TS1005: ';' expected.

1053             : P extends `${infer FieldKey}[${infer IndexKey}]`
                                      ~~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1053:45 - error TS1005: ',' expected.

1053             : P extends `${infer FieldKey}[${infer IndexKey}]`
                                                 ~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1053:52 - error TS1005: ',' expected.

1053             : P extends `${infer FieldKey}[${infer IndexKey}]`
                                                        ~~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1307:23 - error TS1005: ';' expected.

1307          * Checks if `path` is a direct property of `object`.
                           ~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1307:54 - error TS1005: ';' expected.

1307          * Checks if `path` is a direct property of `object`.
                                                          ~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1312:30 - error TS1005: ';' expected.

1312          * @returns Returns `true` if `path` exists, else `false`.
                                  ~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1312:40 - error TS1005: ';' expected.

1312          * @returns Returns `true` if `path` exists, else `false`.
                                            ~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1312:60 - error TS1005: ';' expected.

1312          * @returns Returns `true` if `path` exists, else `false`.
                                                                ~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1346:23 - error TS1005: ';' expected.

1346          * Checks if `path` is a direct or inherited property of `object`.
                           ~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1346:67 - error TS1005: ';' expected.

1346          * Checks if `path` is a direct or inherited property of `object`.
                                                                       ~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1351:30 - error TS1005: ';' expected.

1351          * @returns Returns `true` if `path` exists, else `false`.
                                  ~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1351:40 - error TS1005: ';' expected.

1351          * @returns Returns `true` if `path` exists, else `false`.
                                            ~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1351:60 - error TS1005: ';' expected.

1351          * @returns Returns `true` if `path` exists, else `false`.
                                                                ~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1751:16 - error TS1005: ';' expected.

1751          * to `undefined`. Array and plain object properties are merged recursively.
                    ~~~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1756:43 - error TS1005: ';' expected.

1756          * **Note:** This method mutates `object`.
                                               ~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1761:30 - error TS1005: ';' expected.

1761          * @returns Returns `object`.
                                  ~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1842:33 - error TS1005: ';' expected.

1842          * This method is like `_.merge` except that it accepts `customizer` which
                                     ~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1842:66 - error TS1005: ';' expected.

1842          * This method is like `_.merge` except that it accepts `customizer` which
                                                                      ~~~~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1844:28 - error TS1005: ';' expected.

1844          * properties. If `customizer` returns `undefined` merging is handled by the
                                ~~~~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1844:49 - error TS1005: ';' expected.

1844          * properties. If `customizer` returns `undefined` merging is handled by the
                                                     ~~~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1845:33 - error TS1005: ';' expected.

1845          * method instead. The `customizer` is invoked with seven arguments:
                                     ~~~~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1852:30 - error TS1005: ';' expected.

1852          * @returns Returns `object`.
                                  ~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1938:29 - error TS1005: ';' expected.

1938          * The opposite of `_.pick`; this method creates an object composed of the
                                 ~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:1939:56 - error TS1005: ';' expected.

1939          * own and inherited enumerable properties of `object` that are not omitted.
                                                            ~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:2000:29 - error TS1005: ';' expected.

2000          * The opposite of `_.pickBy`; this method creates an object composed of the
                                 ~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:2001:56 - error TS1005: ';' expected.

2001          * own and inherited enumerable properties of `object` that `predicate`
                                                            ~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:2001:70 - error TS1005: ';' expected.

2001          * own and inherited enumerable properties of `object` that `predicate`
                                                                          ~~~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:2051:54 - error TS1005: ';' expected.

2051          * Creates an object composed of the picked `object` properties.
                                                          ~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:2093:47 - error TS1005: ';' expected.

2093          * Creates an object composed of the `object` properties `predicate` returns
                                                   ~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:2093:67 - error TS1005: ';' expected.

2093          * Creates an object composed of the `object` properties `predicate` returns
                                                                       ~~~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:2443:33 - error TS1005: ';' expected.

2443          * This method is like `_.update` except that it accepts `customizer` which is
                                     ~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:2443:67 - error TS1005: ';' expected.

2443          * This method is like `_.update` except that it accepts `customizer` which is
                                                                       ~~~~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:2444:47 - error TS1005: ';' expected.

2444          * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
                                                   ~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:2444:59 - error TS1005: ';' expected.

2444          * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
                                                               ~~~~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:2444:80 - error TS1005: ';' expected.

2444          * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
                                                                                    ~~~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:2445:65 - error TS1005: ';' expected.

2445          * path creation is handled by the method instead. The `customizer` is invoked
                                                                     ~~~~~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:2448:43 - error TS1005: ';' expected.

2448          * **Note:** This method mutates `object`.
                                               ~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:2456:30 - error TS1005: ';' expected.

2456          * @returns Returns `object`.
                                  ~~~~~~

../../../../../usr/local/lib/node_modules/@types/lodash/common/object.d.ts:2581:1 - error TS1160: Unterminated template literal.

2581 

Can anyone look into that?

@KyloJorgensen
Copy link
Contributor Author

KyloJorgensen commented May 18, 2023

@KyloJorgensen I wanted to do so, but apparently the build script fails now:

Can anyone look into that?

@medikoo #35

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

Successfully merging this pull request may close these issues.

8 participants