feat(fulfillment): Events management (#6730)

**What**
This pr includes some cleanup and refactoring around the abstract event emitter method for the module service to not rely on a named class property but instead on resolution naming.

Includes fulfillment set events on creation. 

The idea is that if that pr allows us to align and agreed on the approach as well as including the cleanup for other pr to use, If this gets merged I ll continue with another pr to do the rest of the event management


partially fix CORE-1735
This commit is contained in:
Adrien de Peretti
2024-03-20 12:44:26 +00:00
committed by GitHub
parent 06f22bb48a
commit c658bd0233
12 changed files with 356 additions and 19 deletions
+14
View File
@@ -531,3 +531,17 @@ export type Pluralize<Singular extends string> = Singular extends `${infer R}y`
| `${infer R}o`
? `${Singular}es`
: `${Singular}s`
export type SnakeCase<S extends string> =
S extends `${infer T}${infer U}${infer V}`
? U extends Uppercase<U>
? `${Lowercase<T>}_${SnakeCase<`${Lowercase<U>}${V}`>}`
: `${T}${SnakeCase<`${U}${V}`>}`
: S
export type KebabCase<S extends string> =
S extends `${infer T}${infer U}${infer V}`
? U extends Uppercase<U>
? `${Lowercase<T>}-${KebabCase<`${Lowercase<U>}${V}`>}`
: `${T}${KebabCase<`${U}${V}`>}`
: S